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

Tracer support in cosmosdb #10265

Merged

Conversation

simplynaveen20
Copy link
Member

@simplynaveen20 simplynaveen20 commented Apr 15, 2020

Added tracer support on all the public api

Sample view from the JaegerUi
image

Following below points

End to end public api capture

No nested spans will be captured only capturing parent call

Span name "."
For query "method name>..”

Span attributes
db.type (cosmosdb)
db.instance(Database name)
db.statement(exact same as span name)
db.url(cosmos account uri)

In case of exception
error.msg(throwable.getMessage())
error.type(throwable.getClass().getName())
error.stack(throwable.printStackTrace())

Span status(both in succes and failure) - Comos status code (HttpBased)

@samvaity samvaity requested a review from trask April 15, 2020 23:07
Copy link
Member

@trask trask left a comment

Choose a reason for hiding this comment

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

Some comments below, mainly about the context propagation code (I was using your code to learn about Reactor context propagation myself 😄, so thank you!).

Btw, I really like the Jaeger screenshot! 👍

Copy link
Contributor

@moderakh moderakh left a comment

Choose a reason for hiding this comment

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

Thanks Naveen, Great work.

I added some comments, also could you please measure the perf
before and after this PR.

using both the internal benchmark and the jmh based benchmark?

@simplynaveen20 simplynaveen20 changed the title [Draft] Tracer support in cosmosdb Tracer support in cosmosdb Apr 24, 2020
@simplynaveen20 simplynaveen20 requested a review from moderakh May 26, 2020 23:18
Copy link
Contributor

@moderakh moderakh left a comment

Choose a reason for hiding this comment

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

CosmosPagedFlux allows both paginated iteration and also item by item iteration.

I see that we covered the pageByPage iteration through adding CosmosPagedFlux#byPage(.) what about the item by item iteration shouldn't we cover the item by item usage too?

@moderakh moderakh self-requested a review May 28, 2020 22:20
Copy link
Contributor

@moderakh moderakh left a comment

Choose a reason for hiding this comment

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

I added a few minor comments.

Please address. other than that LGTM.

@simplynaveen20 simplynaveen20 requested a review from srnagar May 29, 2020 21:13
Copy link
Member

@samvaity samvaity left a comment

Choose a reason for hiding this comment

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

LGTM, apart from few comments

@simplynaveen20
Copy link
Member Author

/azp run java - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@simplynaveen20
Copy link
Member Author

/azp run java - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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.

8 participants