Skip to content

adding readable span#1560

Merged
lzchen merged 23 commits intoopen-telemetry:mainfrom
codeboten:readable-span
Feb 10, 2021
Merged

adding readable span#1560
lzchen merged 23 commits intoopen-telemetry:mainfrom
codeboten:readable-span

Conversation

@codeboten
Copy link
Copy Markdown
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 review from a team, hectorhdzg and toumorokoshi and removed request for a team February 1, 2021 22:44
Copy link
Copy Markdown
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

self._name = name
self._context = context
self._parent = parent
self.sampler = sampler
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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