-
Notifications
You must be signed in to change notification settings - Fork 206
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
Activity integration #1498
Activity integration #1498
Conversation
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
🤖 GitHub commentsTo re-run your PR in the CI, just comment with:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've gone through the PR and left some comments
sample/ApiSamples/Program.cs
Outdated
@@ -10,6 +10,10 @@ | |||
using Elastic.Apm; | |||
using Elastic.Apm.Api; | |||
|
|||
#if NET5_0 | |||
using OpenTelemetry.Trace; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we keep all of the OpenTelemetry samples in the OpenTelemetrySample project?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed - removed from here.
static void Main(string[] args) | ||
{ | ||
Agent.Setup(new AgentComponents()); | ||
new OTSamples().Sample1(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like these can all be static methods?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this matters - changed it.
|
||
namespace Elastic.Apm.OpenTelemetry | ||
{ | ||
public class ElasticActivityListener |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this implement IDisposable
, to dispose the listener
on disposal?
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'"> | ||
<PackageReference Include="System.Diagnostics.PerformanceCounter" Version="4.5.0" /> | ||
</ItemGroup> | ||
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'"> | ||
<PackageReference Include="System.Diagnostics.PerformanceCounter" Version="4.5.0" /> | ||
</ItemGroup> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe combine into <ItemGroup Condition="'$(TargetFramework)' != 'net461'">
?
Most points are addressed from the review - in the last weekly we discussed this and agreed that we'll merge, so we can have this out as beta. |
Solves: #1521
Integration with
System.Diagnostics.Activity
- aka OpenTelemetry bridge.With this, the agent will automatically listen for
Activity
s and turn those into Spans.