Skip to content

Commit

Permalink
add trailing_metadata to _OpenTelemetryServicerContext (#871)
Browse files Browse the repository at this point in the history
The trailing_metadata method was added to grpc._server.ServicerContext
in gRPC v1.38.0.
  • Loading branch information
jbraswell authored Jan 25, 2022
1 parent 91d65e0 commit a2098c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- `opentelemetry-instrumentation-grpc` added `trailing_metadata` to _OpenTelemetryServicerContext.
([#871](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/871))
- `opentelemetry-instrumentation-asgi` now returns a `traceresponse` response header.
([#817](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/817))
- `opentelemetry-instrumentation-kafka-python` added kafka-python module instrumentation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ def send_initial_metadata(self, *args, **kwargs):
def set_trailing_metadata(self, *args, **kwargs):
return self._servicer_context.set_trailing_metadata(*args, **kwargs)

def trailing_metadata(self):
return self._servicer_context.trailing_metadata()

def abort(self, code, details):
self.code = code
self.details = details
Expand Down

0 comments on commit a2098c3

Please sign in to comment.