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

Serilog vendoring #512

Merged
merged 56 commits into from
Oct 11, 2019
Merged

Serilog vendoring #512

merged 56 commits into from
Oct 11, 2019

Conversation

colin-higgins
Copy link
Member

@colin-higgins colin-higgins commented Sep 24, 2019

Changes proposed in this pull request:

  • Tool to maintain vendored libraries
  • Vendor serilog
  • Update third party licenses file
  • Strong sign and reference vendors project
  • Write managed library logs to file
  • Save commit info with vendored code
  • Use nuspec file to deploy vendor library with Datadog.Trace
  • Update WIX files to include new dependencies
  • Test MSI
  • Update CI to build nuget package based on NuSpec
  • Test nuget

@DataDog/apm-dotnet

@colin-higgins colin-higgins added the status:work-in-progress Actively worked on. If this is a PR, no review needed yet. WIP. label Sep 24, 2019
@colin-higgins colin-higgins self-assigned this Sep 24, 2019
@colin-higgins colin-higgins added area:automatic-instrumentation Automatic instrumentation managed C# code (Datadog.Trace.ClrProfiler.Managed) and removed status:work-in-progress Actively worked on. If this is a PR, no review needed yet. WIP. labels Oct 2, 2019
@colin-higgins colin-higgins added this to the 1.7.1 milestone Oct 2, 2019
@colin-higgins colin-higgins marked this pull request as ready for review October 2, 2019 01:52
@colin-higgins colin-higgins requested a review from a team as a code owner October 2, 2019 01:52
@@ -24,6 +25,12 @@ internal Span(SpanContext context, DateTimeOffset? start)
Context = context;
ServiceName = context.ServiceName;
StartTime = start ?? Context.TraceContext.UtcNow;

Log.Debug(
Copy link
Collaborator

Choose a reason for hiding this comment

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

I was actually about to comment here that I wanted to add logging about the traceId and spanId. Regardless of the user's LOGS_INJECTION_ENABLED setting, I was thinking we should always be adding the traceId and spanId with our own managed logging. Do you think we should use the event subscriber approach or do you think this beginning/end logging is sufficient?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think beginning and end logging is sufficient. I don't want to add TOO much to the context, as that'll be logged with everything. Maybe if we start with this and decide it's not enough we can rethink it?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sounds good to me, this is already going to be great information to have!

@@ -264,6 +270,17 @@ public void Finish(DateTimeOffset finishTimestamp)
if (shouldCloseSpan)
{
Context.TraceContext.CloseSpan(this);
if (Log.IsEnabled(LogEventLevel.Debug))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a reason this logging statement is hidden under the Log.IsEnabled check whereas the span start isn't?

Copy link
Member Author

Choose a reason for hiding this comment

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

To prevent the interpolation. Happy to refactor it otherwise.

We have a bunch of spots in c++ that do this on that note.

Copy link
Member

@lucaspimentel lucaspimentel left a comment

Choose a reason for hiding this comment

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

LGTM aside from small changes to Datadog.Trace project file.

src/Datadog.Trace/Datadog.Trace.csproj Outdated Show resolved Hide resolved
src/Datadog.Trace/Datadog.Trace.csproj Outdated Show resolved Hide resolved
src/Datadog.Trace/Datadog.Trace.csproj Outdated Show resolved Hide resolved
src/Datadog.Trace/Datadog.Trace.csproj Outdated Show resolved Hide resolved
src/Datadog.Trace/Datadog.Trace.csproj Outdated Show resolved Hide resolved
@colin-higgins colin-higgins merged commit 23ceaab into master Oct 11, 2019
@colin-higgins colin-higgins deleted the colin/logging/file-log-vendor branch October 11, 2019 14:28
zacharycmontoya added a commit that referenced this pull request Oct 17, 2019
… expected to update a new Datadog.Trace.nuspec file instead of Datadog.Trace.csproj, but that change was ultimately reverted in the final PR
zacharycmontoya added a commit that referenced this pull request Oct 17, 2019
* Revert changes to the SynchronizeVersions tool made in #512, where it expected to update a new Datadog.Trace.nuspec file instead of Datadog.Trace.csproj, but that change was ultimately reverted in the final PR

* Update product version from 1.7.0 to 1.8.0
macrogreg pushed a commit that referenced this pull request Aug 20, 2021
* Revert changes to the SynchronizeVersions tool made in #512, where it expected to update a new Datadog.Trace.nuspec file instead of Datadog.Trace.csproj, but that change was ultimately reverted in the final PR

* Update product version from 1.7.0 to 1.8.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:automatic-instrumentation Automatic instrumentation managed C# code (Datadog.Trace.ClrProfiler.Managed)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants