-
Notifications
You must be signed in to change notification settings - Fork 169
declarative config: support Span stacktrace #2262
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
Merged
Merged
Changes from 50 commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
21d4a01
gcp auth
zeitlinger f9eb67b
./gradlew spotlessApply
otelbot[bot] 35fc448
copy declarative config bridge from instrumentation
zeitlinger 30d61fc
support config bridge
zeitlinger 0f49549
support config bridge
zeitlinger fc7cd07
copy declarative config bridge from instrumentation
zeitlinger d786ea6
format
zeitlinger bf9c8e6
cleanup
zeitlinger b70486a
cleanup
zeitlinger 4d56209
fix test
zeitlinger 85ec1cb
fix
zeitlinger 83e74a7
add property translation for inferred spans
zeitlinger 9fe79a1
inferred spans
zeitlinger 71f21b7
inferred spans
zeitlinger 0618b39
inferred spans
zeitlinger 27fc125
baggage processor
zeitlinger d27d7ce
format
zeitlinger 1e77d6f
format
zeitlinger 548c0c4
stack trace span processor
zeitlinger 092fce3
stack trace span processor
zeitlinger dd10055
fix
zeitlinger 444833f
fix
zeitlinger 4211e85
fix
zeitlinger e4de567
make temp dir more reliable
zeitlinger 19d017d
make temp dir more reliable
zeitlinger fb4a7ef
revert inferred spans (flaky)
zeitlinger a9d9c05
baggage is in a separate PR
zeitlinger 4a119c9
use unified bridge
zeitlinger 4f7014a
add experimental- suffix, add test
zeitlinger 6587b31
add experimental- suffix, add test
zeitlinger d0718e6
update bridge to match agent
zeitlinger e042b15
update bridge to match agent
zeitlinger 5bf5e78
Revert "update bridge to match agent"
zeitlinger b3bfd03
update bridge to match agent
zeitlinger 712cf27
Update gcp-auth-extension/src/main/java/io/opentelemetry/contrib/gcp/…
zeitlinger d2e2ef4
Update gcp-auth-extension/src/main/java/io/opentelemetry/contrib/gcp/…
zeitlinger 85fad27
pr review
zeitlinger 65d2f8e
pr review
zeitlinger 91be485
pr review
zeitlinger bfe1c5e
update config bridge from agent
zeitlinger 454fe0d
./gradlew spotlessApply
otelbot[bot] 4b10dda
move bridge to agent
zeitlinger 26cc42d
Merge remote-tracking branch 'origin/main' into span-stacktrace
zeitlinger 17bbdf0
remove
zeitlinger 741de0f
update
zeitlinger 2e4c0bd
readme
zeitlinger 4d82100
./gradlew spotlessApply
otelbot[bot] 0dcce5e
Merge remote-tracking branch 'origin/main' into span-stacktrace
zeitlinger 0dbfb59
fix casing
zeitlinger d6b0de2
add note about duration
zeitlinger e72361e
map min duration
zeitlinger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
...ktrace/src/main/java/io/opentelemetry/contrib/stacktrace/StackTraceComponentProvider.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| /* | ||
| * Copyright The OpenTelemetry Authors | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| package io.opentelemetry.contrib.stacktrace; | ||
|
|
||
| import com.google.auto.service.AutoService; | ||
| import io.opentelemetry.api.incubator.config.DeclarativeConfigProperties; | ||
| import io.opentelemetry.instrumentation.config.bridge.DeclarativeConfigPropertiesBridgeBuilder; | ||
| import io.opentelemetry.sdk.autoconfigure.spi.internal.ComponentProvider; | ||
| import io.opentelemetry.sdk.trace.SpanProcessor; | ||
|
|
||
| @SuppressWarnings("rawtypes") | ||
| @AutoService(ComponentProvider.class) | ||
| public class StackTraceComponentProvider implements ComponentProvider<SpanProcessor> { | ||
| @Override | ||
| public String getName() { | ||
| return "experimental_stacktrace"; | ||
| } | ||
|
|
||
| @Override | ||
| public SpanProcessor create(DeclarativeConfigProperties config) { | ||
| return StackTraceAutoConfig.create( | ||
| new DeclarativeConfigPropertiesBridgeBuilder() | ||
| .addMapping(StackTraceAutoConfig.PREFIX, "") | ||
| .build(config)); | ||
| } | ||
|
|
||
| @Override | ||
| public Class<SpanProcessor> getType() { | ||
| return SpanProcessor.class; | ||
| } | ||
| } |
32 changes: 32 additions & 0 deletions
32
...ce/src/test/java/io/opentelemetry/contrib/stacktrace/StackTraceComponentProviderTest.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| /* | ||
| * Copyright The OpenTelemetry Authors | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| package io.opentelemetry.contrib.stacktrace; | ||
|
|
||
| import static org.assertj.core.api.Assertions.assertThat; | ||
|
|
||
| import io.opentelemetry.sdk.OpenTelemetrySdk; | ||
| import io.opentelemetry.sdk.extension.incubator.fileconfig.DeclarativeConfiguration; | ||
| import java.io.ByteArrayInputStream; | ||
| import java.nio.charset.StandardCharsets; | ||
| import org.junit.jupiter.api.Test; | ||
|
|
||
| class StackTraceComponentProviderTest { | ||
| @Test | ||
| void endToEnd() { | ||
| String yaml = | ||
| "file_format: 1.0-rc.1\n" | ||
| + "tracer_provider:\n" | ||
| + " processors:\n" | ||
| + " - experimental_stacktrace:\n"; | ||
|
|
||
| OpenTelemetrySdk openTelemetrySdk = | ||
| DeclarativeConfiguration.parseAndCreate( | ||
| new ByteArrayInputStream(yaml.getBytes(StandardCharsets.UTF_8))); | ||
|
|
||
| assertThat(openTelemetrySdk.getSdkTracerProvider().toString()) | ||
| .contains("StackTraceSpanProcessor"); | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.