You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Summary of changes
Adds a new instrumentation for Google Protobuf (not
https://github.com/protobuf-net/protobuf-net)
The instrumentation doesn't create any new spans, we are just adding
tags on existing ones. The main one being a tag containing the full
protobuf schema as an OpenAPI json. Since extracting the schema is
costly, we only do it once every 30 seconds (hardcoded for now).
## Reason for change
On request from DSM team, as an equivalent of its java counterpart:
https://github.com/DataDog/dd-trace-java/tree/master/dd-java-agent/instrumentation/protobuf
## Implementation details
- There is a cache <schema name -> schema json>, but I wanted to control
the size, so I ended up repurposing the code that had been written for
`DbConnectionCache`, where it's using a cache for small cardinality, but
if there are too many different values, it stops caching.
- I wrote a rate limiter rather than reusing one because to avoid
forcing the sampling decision on every span, I needed one where I can
peek the rate limit decision without "consuming" it.
## Test coverage
Added a sample app that serializes and deserializes a protobuf message.
Spans are created manually since this integration doesn't create one.
## Other details
<!-- Fixes #{issue} -->
<!-- ⚠️ Note: where possible, please obtain 2 approvals prior to
merging. Unless CODEOWNERS specifies otherwise, for external teams it is
typically best to have one review from a team member, and one review
from apm-dotnet. Trivial changes do not require 2 reviews. -->
---------
Co-authored-by: Steven Bouwkamp <steven.bouwkamp@datadoghq.com>
0 commit comments