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

Opencensus exporters should populate service_name from Span Resource #1897

Merged
merged 4 commits into from
Jun 8, 2021

Conversation

lzchen
Copy link
Contributor

@lzchen lzchen commented Jun 7, 2021

Fixes #1714

@lzchen lzchen requested review from a team, owais and srikanthccv and removed request for a team June 7, 2021 18:31
Copy link
Member

@srikanthccv srikanthccv left a comment

Choose a reason for hiding this comment

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

We should probably get rid of this logic in exporter(s) init.

        tracer_provider = trace.get_tracer_provider()
        service_name = (
            tracer_provider.resource.attributes[SERVICE_NAME]
            if getattr(tracer_provider, "resource", None)
            else Resource.create().attributes.get(SERVICE_NAME)
        )

CHANGELOG.md Outdated Show resolved Hide resolved
@lzchen lzchen merged commit d26699d into open-telemetry:main Jun 8, 2021
@lzchen lzchen deleted the opencensus branch June 8, 2021 15:43
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.

Opencensus exporters should populate service_name from Span Resource
3 participants