Skip to content

RUM-3250 Provide Otel bundle with logs feature#1979

Merged
mariusc83 merged 1 commit into
feature/otel-supportfrom
mconstantin/rum-3250/provide-otel-bundle-with-logs-feature
Apr 10, 2024
Merged

RUM-3250 Provide Otel bundle with logs feature#1979
mariusc83 merged 1 commit into
feature/otel-supportfrom
mconstantin/rum-3250/provide-otel-bundle-with-logs-feature

Conversation

@mariusc83

Copy link
Copy Markdown
Member

What does this PR do?

A brief description of the change being made with this pull request.

Motivation

What inspired you to submit this pull request?

Additional Notes

Anything else we should know when reviewing?

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@mariusc83 mariusc83 self-assigned this Apr 9, 2024
@mariusc83
mariusc83 force-pushed the mconstantin/rum-3250/provide-otel-bundle-with-logs-feature branch 3 times, most recently from ad27d4e to 2a1f9fc Compare April 9, 2024 14:31
@mariusc83
mariusc83 marked this pull request as ready for review April 9, 2024 14:31
@mariusc83
mariusc83 requested review from a team as code owners April 9, 2024 14:31
@mariusc83
mariusc83 force-pushed the mconstantin/rum-3250/provide-otel-bundle-with-logs-feature branch from 2a1f9fc to acbc65e Compare April 9, 2024 14:51
@codecov-commenter

codecov-commenter commented Apr 9, 2024

Copy link
Copy Markdown

Codecov Report

Merging #1979 (9dae312) into feature/otel-support (4633820) will increase coverage by 0.06%.
The diff coverage is 100.00%.

Additional details and impacted files
@@                   Coverage Diff                    @@
##           feature/otel-support    #1979      +/-   ##
========================================================
+ Coverage                 60.29%   60.36%   +0.06%     
========================================================
  Files                       807      808       +1     
  Lines                     30183    30188       +5     
  Branches                   4945     4945              
========================================================
+ Hits                      18198    18220      +22     
+ Misses                    10766    10749      -17     
  Partials                   1219     1219              
Files Coverage Δ
...ace/bootstrap/instrumentation/api/AgentTracer.java 5.26% <ø> (ø)
.../kotlin/com/datadog/android/trace/AndroidTracer.kt 96.00% <100.00%> (-0.23%) ⬇️
...lin/com/datadog/android/trace/FeatureSdkCoreExt.kt 100.00% <100.00%> (ø)
...in/com/datadog/android/trace/OtelTracerProvider.kt 95.87% <100.00%> (+0.25%) ⬆️

... and 32 files with indirect coverage changes

0xnm
0xnm previously approved these changes Apr 9, 2024
Comment on lines +55 to +58
val traceContext: MutableMap<String, Any?> = mutableMapOf()
argumentCaptor<(MutableMap<String, Any?>) -> Unit> {
verify(mockSdkCore).updateFeatureContext(eq(Feature.TRACING_FEATURE_NAME), capture())
firstValue.invoke(traceContext)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

traceContext can be directly in lambda

Suggested change
val traceContext: MutableMap<String, Any?> = mutableMapOf()
argumentCaptor<(MutableMap<String, Any?>) -> Unit> {
verify(mockSdkCore).updateFeatureContext(eq(Feature.TRACING_FEATURE_NAME), capture())
firstValue.invoke(traceContext)
argumentCaptor<(MutableMap<String, Any?>) -> Unit> {
verify(mockSdkCore).updateFeatureContext(eq(Feature.TRACING_FEATURE_NAME), capture())
val traceContext: MutableMap<String, Any?> = mutableMapOf()
firstValue.invoke(traceContext)

@mariusc83
mariusc83 force-pushed the mconstantin/rum-3250/provide-otel-bundle-with-logs-feature branch from acbc65e to 9dae312 Compare April 9, 2024 15:37

AgentScope activateNext(AgentSpan span);

@Nullable

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.

Note

That is a nice idea, but shouldn't we add @Nullable/@NonNull to all methods' return value and arguments, just to be safe?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is a huge task and should not be part of this epic, for now I am adding this whenever I interact with the Java code from Kotlin because this is where the problem can come from. As a rule of thumb we should always check the Java code when calling from Kotlin to make sure we are safe.

@mariusc83
mariusc83 merged commit 399b663 into feature/otel-support Apr 10, 2024
@mariusc83
mariusc83 deleted the mconstantin/rum-3250/provide-otel-bundle-with-logs-feature branch April 10, 2024 08:17
@xgouchet xgouchet added this to the 2.11.x milestone Jul 31, 2024
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