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

Change span.resource to use AWS command name #377

Merged
merged 2 commits into from
Jun 7, 2018

Conversation

jfrancoist
Copy link
Contributor

@jfrancoist jfrancoist commented Mar 20, 2018

As per issue #374, this PR goal is to make the AWS service page behave in a similar way to other services such as Rails/Web/Redis...

As I see it aws.command label does not add any value in either the service page or trace view, since AWS service will alread be defined by AWS by default, we can easily find out that traces are coming from there.

On the service page what we want to see is a list of methods/actions and how they are performing, each method can then be further drilled down for related traces.

The current behaviour :

image

With this PR the service be would have each method listed :

image

@jfrancoist jfrancoist force-pushed the jtopige_change-aws-span-resource branch 2 times, most recently from af422bb to ebc4e3b Compare March 20, 2018 21:10
@delner delner added this to the 0.13.0 milestone Apr 5, 2018
@delner delner removed this from the 0.13.0 milestone Apr 13, 2018
@palazzem palazzem added integrations Involves tracing integrations community Was opened by a community member labels Apr 16, 2018
@palazzem palazzem added this to the 0.13.0 milestone Apr 16, 2018
Copy link
Contributor

@palazzem palazzem left a comment

Choose a reason for hiding this comment

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

The change is great! A small other change that we'll handle and then it's good to be merged! Thank you very much!

@@ -28,7 +28,7 @@ def annotate!(span, pin, context)
span.service = pin.service
span.span_type = pin.app_type
span.name = context.safely(:resource)
span.resource = RESOURCE
span.resource = context.safely(:resource)
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a great change that improves how stats are computed in our system. I'd say that probably the span.name should be what we used to have for RESOURCE (so aws.command or similar).

We can update this part so that your contribution will be merged in the 0.13 development branch. Thank you very much!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great thanks.

I am still a bit confused how the span.name and span.resource works in the trace UI.

But based on this screen :
image

Wouldn't changing the span.name to RESOURCE change the trace view to show aws.command instead of the resource name (i.e s3.head_object) ?

Copy link
Contributor

Choose a reason for hiding this comment

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

the span.name ? in your screenshot is actually the span name too. So, yes, you'd be correct.

The relationship between name and resource is roughly group to subgroup. In other words "a [resource] is a kind of [span name]". By setting the name to aws.command, you get the benefit of seeing aws.command be broken down into each of its constituent resources, although you won't see the resource name appear as the label for the visual element in the flamegraph.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see now. Make sense. Thanks for the clarification.

@delner
Copy link
Contributor

delner commented Jun 4, 2018

@jfrancoist Did you still want to see this change? We're planning a release for next week, and it'd be great to get this one in if you're interested.

@jfrancoist
Copy link
Contributor Author

jfrancoist commented Jun 6, 2018

@delner I did the change as suggested by @palazzem. Basically switching span.name with RESOURCE. Do you need anything else from me on that PR?

delner
delner previously approved these changes Jun 6, 2018
Copy link
Contributor

@delner delner left a comment

Choose a reason for hiding this comment

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

Changes look good to me. Thanks for the contribution, @jfrancoist ! 🎉

@delner
Copy link
Contributor

delner commented Jun 6, 2018

@jfrancoist Actually before we merge this, can you rebase this on the latest master and see that the tests pass?

@delner delner dismissed their stale review June 6, 2018 17:01

Need CI to pass.

@jfrancoist jfrancoist force-pushed the jtopige_change-aws-span-resource branch from aa8e28f to 0d4021c Compare June 6, 2018 18:28
@jfrancoist
Copy link
Contributor Author

@delner I rebased and wanted to make a final check before you guys review/merge. Even though I understood the point of @palazzem concerning the span.name it looks a bit weird to me when looking at the traces. See the transformation screens below.

Service screen 🎉

The expected behaviour is here with the change
final_dd_view_1

Trace - Frame Graph 😐

Now instead of seeing the aws method name I can only seeaws.command , which for me should be the operation name, it make more sense as an overview, so I don't have to dig further down
final_dd_view_2

Trace - List 🙂

This part seems to be fine, whether the real method name is displayed of the service, because either way you will need to click on each trace to understand what is going on.
final_dd_view_3

Let me know if you think this change is acceptable or should be revert back the last commit and leave.

span.name = context.safely(:resource)

@delner
Copy link
Contributor

delner commented Jun 6, 2018

@jfrancoist That all looks correct. Per our current UI setup, you're not supposed to see resource names on the flame graph elements themselves, just span names. Perhaps you could request to our UI team that you have the option of displaying resource names instead of span names on the flame graph. From what I understand, it's something currently on their radar to support, so it may happen sometime in the future (although I can't say when.)

@jfrancoist
Copy link
Contributor Author

That's sound like a good alternative. The PR is then ready in my opinion. Just need a 👍 .

Copy link
Contributor

@delner delner left a comment

Choose a reason for hiding this comment

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

Approved! 🎉 Thanks @jfrancoist !

@delner delner dismissed palazzem’s stale review June 7, 2018 15:42

Feedback was addressed.

@delner delner merged commit 94be661 into DataDog:master Jun 7, 2018
@delner delner modified the milestones: 0.13.0, 0.12.1 Jun 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Was opened by a community member integrations Involves tracing integrations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants