Skip to content
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

Snippet Injection Smoke Test #8655

Merged
merged 9 commits into from
Jun 7, 2023
Prev Previous commit
Next Next commit
Update ExperimentalSnippetHolder.java
  • Loading branch information
siyuniu-ms committed Jun 6, 2023
commit 3f05f8e8b41cf4eeee2e0bf65043923f60cc0e83
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,16 @@

public class ExperimentalSnippetHolder {

private static final AtomicReference<String> snippet =
new AtomicReference<>(
ConfigPropertiesUtil.getString("otel.experimental.javascript-snippet") == null
? ""
: ConfigPropertiesUtil.getString("otel.experimental.javascript-snippet"));
private static final AtomicReference<String> snippet = new AtomicReference<>(getSnippetSetting());

private static String getSnippetSetting() {
String result = ConfigPropertiesUtil.getString("otel.experimental.javascript-snippet");
if (result == null) {
return "";
} else {
return result;
}
siyuniu-ms marked this conversation as resolved.
Show resolved Hide resolved
}

public static void setSnippet(String newValue) {
snippet.compareAndSet("", newValue);
Expand Down
Loading