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

adding readable span #1560

Merged
merged 23 commits into from
Feb 10, 2021
Merged

adding readable span #1560

merged 23 commits into from
Feb 10, 2021

Conversation

codeboten
Copy link
Contributor

Description

This PR adds ReadableSpan to provide read-only access to attributes of a Span

Fixes #1001

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been updated
  • Documentation has been updated

@codeboten codeboten requested a review from a team as a code owner February 1, 2021 22:44
@codeboten codeboten requested review from toumorokoshi and hectorhdzg and removed request for a team February 1, 2021 22:44
Copy link
Member

@toumorokoshi toumorokoshi left a comment

Choose a reason for hiding this comment

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

LGTM

opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py Outdated Show resolved Hide resolved
self.parent = parent
self._name = name
self._context = context
self._parent = parent
self.sampler = sampler
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we lock down sampler, traceconfig and span_processor?

@lzchen
Copy link
Contributor

lzchen commented Feb 2, 2021

As discussed with @codeboten , not certain yet if the current PR adds much value if we don't prevent the "writeable" property on the span when passed into the spanprocessor.

@codeboten
Copy link
Contributor Author

As discussed with @codeboten , not certain yet if the current PR adds much value if we don't prevent the "writeable" property on the span when passed into the spanprocessor.

Span now returns a ReadableSpan on_end

@lzchen lzchen merged commit 78f6949 into open-telemetry:main Feb 10, 2021
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.

SDK SHOULD NOT provide access to a Span's attributes besides its SpanContext
3 participants