Apm-agent-dotnet: Send Hostname to the APM Server

Created on 10 Oct 2019  路  10Comments  路  Source: elastic/apm-agent-dotnet

I'm working with microservices and i dont know which machine has been requested.
I have so much machines working.

I did not find a way to add custom contexts for requests.
I did not find already built in ways to do this.

This is possible? How can we do this?
Already has a way to do this or need dev?

"System.Environment.MachineName"

enhancement good first issue

Most helpful comment

News about the "low effort" and "fairly important" ? ^^
Let me know if no one of you started coding, i'll try to implement it.
Tks!

All 10 comments

Currently what we have is the ip of the host.

Screen Shot 2019-10-10 at 21 22 59

But this is a good point and there would be some ways to improve this. There is a new field called detected_hostname (well, it's not that new, we already had hostname, it's just that the .NET Agent have not sent it). This is probably something that'd help you.

Another option to solve this would be to use global labels: https://github.com/elastic/apm-agent-dotnet/issues/183

These 2 are not yet implemented, so the answer is that if the ip is not enough then this is something we need to work on.

FWIW, it would be super convenient to have some of these quick filter links work, but it looks like they use the host.hostname field, which, as you said, is not populated by the .net agent.

image

We are happy to take PRs :)

Otherwise: noted and thanks for the feedback. I'd say this is a low effort and is fairly important. We'll try to prioritize accordingly.

Yessir, ip 127.0.0.1 does not help a lot ^^
What about using Environment Variables? https://github.com/elastic/apm-agent-dotnet/pull/413
Have you an example of how to use it?
I think host.hostname will be a better approach.

We are happy to take PRs :)

Otherwise: noted and thanks for the feedback. I'd say this is a low effort and is fairly important. We'll try to prioritize accordingly.

I'll see if I can take a stab at it tomorrow.

News about the "low effort" and "fairly important" ? ^^
Let me know if no one of you started coding, i'll try to implement it.
Tks!

News about the "low effort" and "fairly important" ? ^^
Let me know if no one of you started coding, i'll try to implement it.
Tks!

@iquirino according to my knowledge no one works on it actively at the moment. So, feel free to give it a try!

I made an attempt on Friday, but I don't think I'm well-versed enough in this code to figure out where to add the host name.

Or I missed something super-obvious. Either is plausible :)

What about send the executing assembly name and version to help track which version throw exceptions?

What about send the executing assembly name and version to help track which version throw exceptions?

It's already supported by ServiceName and ServiceVersion parameters.

Was this page helpful?
0 / 5 - 0 ratings