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

feat: add telemetry logs #185

Merged
merged 4 commits into from
Feb 16, 2025
Merged

feat: add telemetry logs #185

merged 4 commits into from
Feb 16, 2025

Conversation

dmehala
Copy link
Collaborator

@dmehala dmehala commented Feb 11, 2025

Description

Add support telemetry logs

Note to reviewers

This PR only adds the API for collecting and reporting logs. As of now, the library is not yet reporting logs because I am planning to refactor the whole telemetry module and error handling.

@dmehala dmehala requested a review from a team as a code owner February 11, 2025 17:13
@dmehala dmehala requested review from cataphract and removed request for a team February 11, 2025 17:13
@codecov-commenter
Copy link

codecov-commenter commented Feb 11, 2025

Codecov Report

Attention: Patch coverage is 26.66667% with 22 lines in your changes missing coverage. Please review.

Project coverage is 93.16%. Comparing base (f3ebccc) to head (736590f).

Files with missing lines Patch % Lines
src/datadog/tracer_telemetry.cpp 8.33% 22 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #185      +/-   ##
==========================================
- Coverage   93.60%   93.16%   -0.45%     
==========================================
  Files          73       73              
  Lines        4256     4286      +30     
==========================================
+ Hits         3984     3993       +9     
- Misses        272      293      +21     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@dubloom dubloom left a comment

Choose a reason for hiding this comment

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

LGTM overall. Don't we want to add a test for logs payload as well ? Maybe you want to do it after the refactoring. I could get that.

class Telemetry {
/// The telemetry class is responsible for handling internal telemetry data to
/// track Datadog product usage. It _can_ collect and report logs and metrics.
///
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't we have private headers ? If yes, is there a reason to put the file in the public headers and say do not use ?

Copy link
Collaborator Author

@dmehala dmehala Feb 14, 2025

Choose a reason for hiding this comment

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

Imagine I am implementing appsec, how Datadog user/integrator outside of the tracer could use it if it's private?

@pr-commenter
Copy link

pr-commenter bot commented Feb 15, 2025

Benchmarks

Benchmark execution time: 2025-02-15 13:41:10

Comparing candidate commit 736590f in PR branch dmehala/telemetry-logs with baseline commit f3ebccc in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 1 metrics, 0 unstable metrics.

@dmehala dmehala merged commit 1a632bc into main Feb 16, 2025
22 checks passed
@dmehala dmehala deleted the dmehala/telemetry-logs branch February 16, 2025 18:17
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.

4 participants