-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SNOW-1480779 Support Method Chain in the Telemetry #121
Conversation
@@ -14,39 +14,39 @@ public class JavaOpenTelemetrySuite extends JavaOpenTelemetryEnabled { | |||
public void cacheResult() { | |||
DataFrame df = getSession().sql("select * from values(1),(2),(3) as t(num)"); | |||
df.cacheResult(); | |||
checkSpan("snow.snowpark.DataFrame", "cacheResult", null); | |||
checkSpan("snow.snowpark.DataFrame", "cacheResult"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we not check method chain in this situation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I improved this checker function.
private void checkSpan(String className, String funcName) {
StackTraceElement[] stack = Thread.currentThread().getStackTrace();
StackTraceElement file = stack[2];
checkSpan(
className,
funcName,
"JavaOpenTelemetrySuite.java",
file.getLineNumber() - 1,
"DataFrame." + funcName);
}
if no methodChain
input, the default one is "DataFrame." + funcName
.
Implement Method Chain in the Open Telemetry