Skip to content

Conversation

@zeitlinger
Copy link
Member

@zeitlinger zeitlinger commented Sep 1, 2025

Part of #14087

Note: automatically also applies to spring starter

@zeitlinger zeitlinger requested a review from a team as a code owner September 1, 2025 15:00
@github-actions github-actions bot added the test native This label can be applied to PRs to trigger them to run native tests label Sep 1, 2025
@zeitlinger zeitlinger changed the title add thread details resource processor declarative config: add thread details resource processor Sep 8, 2025
@zeitlinger
Copy link
Member Author

@trask please have a look


public static Stream<Arguments> listProperties() {
return Stream.of(
Arguments.of("otel.experimental.metrics.view.config", Arrays.asList("a", "b")),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this view config being removed? same quesetion for the application.yml

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

poor choice to put the incubator in api

The incubator triggers the view config into the classpath - resulting in a file not found exception

@zeitlinger zeitlinger force-pushed the declarative-config-thread-details-provider branch from ae673f1 to 72df93d Compare September 9, 2025 10:57
@zeitlinger zeitlinger added this to the v2.20.0 milestone Sep 12, 2025
@zeitlinger
Copy link
Member Author

@trask maybe this can make it into the current release, because we already discussed it before

feel free to remove if it still needs discussion

* This class is internal and is hence not for public use. Its APIs are unstable and can change at
* any time.
*/
public class ThreadDetailsComponentProvider implements ComponentProvider<SpanProcessor> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still interested in thread.name being added before span start, especially in declarative config, so it can be used by the declarative config rule-based sampler

I guess we could always have the rule-based sampler hard-code support for thread.name since it runs on the same thread, but that feels a little hacky (is thread.name always available in the rule-based sampler then even if the attribute isn't being stamped onto the span?)

I'm not sure how best to accomplish this though

cc @laurit

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The way I see it we have 2 options. Either let rule based sampler compute thread.name itself or add the thread.name in instrumentation api.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@laurit @trask as discussed, I created #15209 that adds thread details directly in the instrumenter

@trask trask removed this from the v2.20.0 milestone Sep 13, 2025
@laurit laurit added this to the v2.21.0 milestone Sep 30, 2025
@zeitlinger zeitlinger removed this from the v2.21.0 milestone Oct 16, 2025
@zeitlinger
Copy link
Member Author

@trask as discussed I tried adding the logic to add thread attributes directly in IntrumentationBuilder.

ExtendedOpenTelemetry is incubating, so it can't be used in IntrumentationBuilder.

@zeitlinger
Copy link
Member Author

@trask as discussed I tried adding the logic to add thread attributes directly in IntrumentationBuilder.

ExtendedOpenTelemetry is incubating, so it can't be used in IntrumentationBuilder.

I'll try using the IncubatingUtil pattern from the SDK

@zeitlinger
Copy link
Member Author

I'll try using the IncubatingUtil pattern from the SDK

turns out we already use incubating, e.g.

@zeitlinger
Copy link
Member Author

Closed in favor of #15209

@zeitlinger zeitlinger closed this Nov 3, 2025
@zeitlinger zeitlinger deleted the declarative-config-thread-details-provider branch November 3, 2025 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test native This label can be applied to PRs to trigger them to run native tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants