Closed Jamie-Clayton closed 2 years ago
Hi @Jamie-Clayton, thanks for flagging this. Those specific instructions are not meant to be "getting started" copy-and-paste examples, but rather "if you were doing this before, do this instead". In that respect they're not intended to be "complete", just to show how things have changed.
That said, I think there's definitely value in having those "getting started" examples in that doc. We have some samples in the repository for specific scenarios, but those are related to specific scenarios. It makes sense to have a simple "create a span" example in the NuGet ReadMe too. Thanks!
It seems like we have the simple "create a span" example in the repository readme and the NuGet readme (same file, iirc). There are also more examples in the official docs: https://docs.datadoghq.com/tracing/trace_collection/custom_instrumentation/dotnet/
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
Expected behavior Quickly copy sample code into a solution and get the expected log/trace interaction working.
Ideally, logs and tracing for (web ui, webapi,SQL Server Database [3 tier]) solutions should work to ensure logging (including debugging logging) links traces and errors with custom spans. There are some differences to the api examples provided for open telemetry, see https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/examples/Console/InstrumentationWithActivitySource.cs.
Runtime environment (please complete the following information):