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

Drop sampled spans #135

Merged
merged 2 commits into from
Jun 2, 2023
Merged

Drop sampled spans #135

merged 2 commits into from
Jun 2, 2023

Conversation

eirsyl
Copy link
Member

@eirsyl eirsyl commented Jun 2, 2023

ddtrace sends sampled spans to the agent to aggregate metrics. We need to remove the traces manually to not ingest everything.

@eirsyl eirsyl requested a review from kiloreven as a code owner June 2, 2023 11:57
@eirsyl eirsyl changed the base branch from main to troncos/v4 June 2, 2023 11:57
@eirsyl eirsyl changed the title Sylliaas/drop sampled spans Drop sampled spans Jun 2, 2023
@eirsyl eirsyl requested review from torarvid and gbbirkisson and removed request for kiloreven June 2, 2023 11:58
@eirsyl eirsyl merged commit 0cd251c into troncos/v4 Jun 2, 2023
@eirsyl eirsyl deleted the sylliaas/drop-sampled-spans branch June 2, 2023 12:08
eirsyl added a commit that referenced this pull request Jun 13, 2023
* Initial v4 version

* Django logging middleware (#124)

* Initial django logging middleware

* Add django middleware docs

* Bump version

* Celery task log (#125)

* Initial celery signals

* Add celery task logging

* Add docs (#126)

* Bump version

* Add GRPC span exporter (#127)

* Bump version

* Use BoundedAttributes when adding attributes to events

* Bump version

* Change span class

* Bump version

* Use ReadonlySpan, Span uses locks

* Bump version

* Dont use Resource.create, it tries to detect app info we dont need

* Bump version

* Add structlog logfmt renderer

* Add print_loggers helper tool

* Add decorators

* Remove required logger prefix in middleware

* Explicitly log trace_id in ASGI middleware

* Dont log empty events

* Make django profiling view sync

* Bump version

* Make translate_span a little faster (#132)

* Make translate_span a little faster

Using py-spy, it looks like the previous version spent some time doing

list(default_resource.attributes.keys()) every time it was called.

It seems this can be done once in the OTELWriter constructor instead.
Also, I think we can make it a set instead of a list (I believe `a in
my_set` is a bit quicker than `a in my_list`).

Does this commit include tests to verify the speed increase? Nah... 🤷

* isort

* Bump version

* Add some tiny performance improvements

* Drop sampled spans (#135)

* Dont write sampled spans to the otel endpoint

* Add span.sampled check

* Bump version

* Add py-spy profiler support (#137)

* Bump version

* Add basic and token auth support to py-spy profiler (#138)

* Bump version

* Add instance tag to the py-spy profiler

* Use tracer tags, this lets us reuse tags added by tracer.set_tags

---------

Co-authored-by: Guðmundur Björn Birkisson <[email protected]>
Co-authored-by: Tor Arvid Lund <[email protected]>
Co-authored-by: Tor Arvid Lund <[email protected]>
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.

2 participants