Skip to content

Add resource to log #13

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

Closed
wants to merge 1 commit into from
Closed

Conversation

mladjan-gadzic
Copy link
Contributor

@mladjan-gadzic mladjan-gadzic commented May 15, 2025

  • expanded PartialActivityProcessor constructor to accept ResourceBuilder
  • ResourceBuilder is set during LoggerFactory creation
  • modified example
  • added tests (exporter for tests pursposes has to be created because log record does not have resource and it has to be accessed on exporter level)

@mladjan-gadzic mladjan-gadzic marked this pull request as ready for review May 15, 2025 09:45
@mladjan-gadzic
Copy link
Contributor Author

do we want to bump up version and release this?

.AddProcessor(new PartialActivityProcessor(logExporter: otlpLogExporter,
heartbeatIntervalMilliseconds: 1000))
resourceBuilder: resourceBuilder, heartbeatIntervalMilliseconds: 1000))
Copy link

Choose a reason for hiding this comment

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

How does this work in more typical usage with `ConfigureResource()?

        services.AddOpenTelemetry()
            .UseOtlpExporter()
            .ConfigureResource(r => r.AddService("MyApplicationName", serviceVersion: "1.3.2"));

@mladjan-gadzic mladjan-gadzic deleted the no-ticket-add-resources-to-log branch May 16, 2025 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants