Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/docker/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -euxo pipefail

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
VERSION=1.25.0
VERSION=1.25.1

cd "$DIR/../.."
mkdir -p deploy/linux
Expand Down
542 changes: 271 additions & 271 deletions integrations.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Datadog.Trace" Version="1.25.0" />
<PackageReference Include="Datadog.Trace" Version="1.25.1-prerelease" />
<PackageReference Include="log4net" Version="2.0.12" />
<PackageReference Include="log4net.Ext.Json" Version="2.0.8.3" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Datadog.Trace" Version="1.25.0" />
<PackageReference Include="Datadog.Trace" Version="1.25.1-prerelease" />
<PackageReference Include="NLog" Version="4.0.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Datadog.Trace" Version="1.25.0" />
<PackageReference Include="Datadog.Trace" Version="1.25.1-prerelease" />
<PackageReference Include="NLog" Version="4.5.11" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Datadog.Trace" Version="1.25.0" />
<PackageReference Include="Datadog.Trace" Version="1.25.1-prerelease" />
<PackageReference Include="NLog" Version="4.6.7" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Datadog.Trace" Version="1.25.0" />
<PackageReference Include="Datadog.Trace" Version="1.25.1-prerelease" />
<PackageReference Include="Serilog" Version="2.9.0" />
<PackageReference Include="Serilog.Formatting.Compact" Version="1.1.0" />
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
Expand Down
2 changes: 1 addition & 1 deletion samples/ConsoleApp/Alpine3.10.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ COPY --from=build /app/out .

# Set up Datadog APM
RUN apk --no-cache update && apk add curl
ARG TRACER_VERSION=1.25.0
ARG TRACER_VERSION=1.25.1
RUN mkdir -p /var/log/datadog
RUN mkdir -p /opt/datadog
RUN curl -L https://github.com/DataDog/dd-trace-dotnet/releases/download/v${TRACER_VERSION}/datadog-dotnet-apm-${TRACER_VERSION}-musl.tar.gz \
Expand Down
2 changes: 1 addition & 1 deletion samples/ConsoleApp/Alpine3.9.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ COPY --from=build /app/out .

# Set up Datadog APM
RUN apk --no-cache update && apk add curl
ARG TRACER_VERSION=1.25.0
ARG TRACER_VERSION=1.25.1
RUN mkdir -p /var/log/datadog
RUN mkdir -p /opt/datadog
RUN curl -L https://github.com/DataDog/dd-trace-dotnet/releases/download/v${TRACER_VERSION}/datadog-dotnet-apm-${TRACER_VERSION}-musl.tar.gz \
Expand Down
2 changes: 1 addition & 1 deletion samples/ConsoleApp/Debian.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ WORKDIR /app
COPY --from=build /app/out .

# Set up Datadog APM
ARG TRACER_VERSION=1.25.0
ARG TRACER_VERSION=1.25.1
RUN mkdir -p /var/log/datadog
RUN mkdir -p /opt/datadog
RUN curl -LO https://github.com/DataDog/dd-trace-dotnet/releases/download/v${TRACER_VERSION}/datadog-dotnet-apm_${TRACER_VERSION}_amd64.deb
Expand Down
2 changes: 1 addition & 1 deletion src/Datadog.Trace.AspNet/Datadog.Trace.AspNet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks>net45</TargetFrameworks>

<!-- NuGet -->
<Version>1.25.0</Version>
<Version>1.25.1-prerelease</Version>
<Title>Datadog APM Tracing for ASP.NET</Title>
<PackageDescription>
DEPRECATED. This package exists only for backwards compatibility. If your project references this package ("Datadog.Trace.AspNet") or "Datadog.Trace.ClrProfiler.Managed", you can remove them both.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<RootNamespace>Datadog.Trace.ClrProfiler</RootNamespace>

<!-- NuGet -->
<Version>1.25.0</Version>
<Version>1.25.1-prerelease</Version>
<IsPackable>false</IsPackable>

<!-- Allow the GenerateAssemblyInfo task in the .NET SDK to generate all
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<OutputPath>..\bin\ProfilerResources\</OutputPath>

<!-- NuGet -->
<Version>1.25.0</Version>
<Version>1.25.1-prerelease</Version>

<!-- Hide warnings for EOL .NET Core targets (e.g. netcoreapp2.0) -->
<CheckEolTargetFramework>false</CheckEolTargetFramework>
Expand Down
2 changes: 1 addition & 1 deletion src/Datadog.Trace.ClrProfiler.Managed.Loader/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ private static void TryLoadManagedAssembly()
{
try
{
var assembly = Assembly.Load("Datadog.Trace.ClrProfiler.Managed, Version=1.25.0.0, Culture=neutral, PublicKeyToken=def86d061d0d2eeb");
var assembly = Assembly.Load("Datadog.Trace.ClrProfiler.Managed, Version=1.25.1.0, Culture=neutral, PublicKeyToken=def86d061d0d2eeb");

if (assembly != null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<RootNamespace>Datadog.Trace.ClrProfiler</RootNamespace>

<!-- NuGet -->
<Version>1.25.0</Version>
<Version>1.25.1-prerelease</Version>
<Title>Datadog APM - ClrProfiler</Title>
<PackageDescription>
DEPRECATED. This package exists only for backwards compatibility. If your project references this package ("Datadog.Trace.ClrProfiler.Managed") or "Datadog.Trace.AspNet", you can remove them both.
Expand Down
2 changes: 1 addition & 1 deletion src/Datadog.Trace.ClrProfiler.Native/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cmake_policy(SET CMP0015 NEW)
# Project definition
# ******************************************************

project("Datadog.Trace.ClrProfiler.Native" VERSION 1.25.0)
project("Datadog.Trace.ClrProfiler.Native" VERSION 1.25.1)

# ******************************************************
# Environment detection
Expand Down
8 changes: 4 additions & 4 deletions src/Datadog.Trace.ClrProfiler.Native/Resource.rc
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ END
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,25,0,0
PRODUCTVERSION 1,25,0,0
FILEVERSION 1,25,1,0
PRODUCTVERSION 1,25,1,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -68,12 +68,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "Datadog, Inc."
VALUE "FileDescription", "Datadog CLR Profiler"
VALUE "FileVersion", "1.25.0.0"
VALUE "FileVersion", "1.25.1.0"
VALUE "InternalName", "Datadog.Trace.ClrProfiler.Native.DLL"
VALUE "LegalCopyright", "Copyright 2017 Datadog, Inc."
VALUE "OriginalFilename", "Datadog.Trace.ClrProfiler.Native.DLL"
VALUE "ProductName", "Datadog .NET Tracer"
VALUE "ProductVersion", "1.25.0"
VALUE "ProductVersion", "1.25.1"
END
END
BLOCK "VarFileInfo"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ namespace trace {
WStr("ISymWrapper")
};

inline WSTRING managed_profiler_full_assembly_version = WStr("Datadog.Trace.ClrProfiler.Managed, Version=1.25.0.0, Culture=neutral, PublicKeyToken=def86d061d0d2eeb");
inline WSTRING managed_profiler_full_assembly_version = WStr("Datadog.Trace.ClrProfiler.Managed, Version=1.25.1.0, Culture=neutral, PublicKeyToken=def86d061d0d2eeb");

inline WSTRING calltarget_modification_action = WStr("CallTargetModification");

Expand Down
2 changes: 1 addition & 1 deletion src/Datadog.Trace.ClrProfiler.Native/version.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#pragma once

constexpr auto PROFILER_VERSION = "1.25.0";
constexpr auto PROFILER_VERSION = "1.25.1";
2 changes: 1 addition & 1 deletion src/Datadog.Trace.MSBuild/Datadog.Trace.MSBuild.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Version>1.25.0</Version>
<Version>1.25.1-prerelease</Version>
</PropertyGroup>

<!-- For VS testing purposes only, copy all implementation assemblies to the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<!-- NuGet -->
<Version>1.25.0</Version>
<Version>1.25.1-prerelease</Version>
<Title>Datadog APM - OpenTracing</Title>
<Description>Provides OpenTracing support for Datadog APM</Description>
<PackageTags>$(PackageTags);OpenTracing</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Version>1.25.0</Version>
<Version>1.25.1-prerelease</Version>
<Title>Datadog APM Auto-instrumentation Runner</Title>
<Copyright>Copyright 2020 Datadog, Inc.</Copyright>
<OutputType>Exe</OutputType>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Version>1.25.0</Version>
<Version>1.25.1-prerelease</Version>
<Title>Datadog APM Auto-instrumentation Runner</Title>
<Copyright>Copyright 2020 Datadog, Inc.</Copyright>
<OutputType>Exe</OutputType>
Expand Down
12 changes: 12 additions & 0 deletions src/Datadog.Trace/Configuration/ConfigurationKeys.cs
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,18 @@ public static class ConfigurationKeys
/// <seealso cref="TracerSettings.HttpClientErrorStatusCodes"/>
public const string HttpClientErrorStatusCodes = "DD_HTTP_CLIENT_ERROR_STATUSES";

/// <summary>
/// Configuration key to enable sending partial traces to the agent
/// </summary>
/// <seealso cref="TracerSettings.PartialFlushEnabled"/>
public const string PartialFlushEnabled = "DD_TRACE_PARTIAL_FLUSH_ENABLED";

/// <summary>
/// Configuration key to set the minimum number of closed spans in a trace before it's partially flushed
/// </summary>
/// <seealso cref="TracerSettings.PartialFlushMinSpans"/>
public const string PartialFlushMinSpans = "DD_TRACE_PARTIAL_FLUSH_MIN_SPANS";

/// <summary>
/// String format patterns used to match integration-specific configuration keys.
/// </summary>
Expand Down
35 changes: 35 additions & 0 deletions src/Datadog.Trace/Configuration/TracerSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ public class TracerSettings
/// </summary>
public const int DefaultAgentPort = 8126;

private int _partialFlushMinSpans;

/// <summary>
/// Initializes a new instance of the <see cref="TracerSettings"/> class with default values.
/// </summary>
Expand Down Expand Up @@ -183,6 +185,17 @@ public TracerSettings(IConfigurationSource source)

RouteTemplateResourceNamesEnabled = source?.GetBool(ConfigurationKeys.FeatureFlags.RouteTemplateResourceNamesEnabled)
?? false;

PartialFlushEnabled = source?.GetBool(ConfigurationKeys.PartialFlushEnabled)
// default value
?? false;

var partialFlushMinSpans = source?.GetInt32(ConfigurationKeys.PartialFlushMinSpans);

if ((partialFlushMinSpans ?? 0) <= 0)
{
PartialFlushMinSpans = 500;
}
}

/// <summary>
Expand Down Expand Up @@ -353,6 +366,28 @@ public bool DiagnosticSourceEnabled
set { }
}

/// <summary>
/// Gets or sets a value indicating whether partial flush is enabled
/// </summary>
public bool PartialFlushEnabled { get; set; }

/// <summary>
/// Gets or sets the minimum number of closed spans in a trace before it's partially flushed
/// </summary>
public int PartialFlushMinSpans
{
get => _partialFlushMinSpans;
set
{
if (value <= 0)
{
throw new ArgumentException("The value must be strictly greater than 0", nameof(PartialFlushMinSpans));
}

_partialFlushMinSpans = value;
}
}

/// <summary>
/// Gets or sets a value indicating whether the diagnostic log at startup is enabled
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Datadog.Trace/Datadog.Trace.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<!-- NuGet -->
<Version>1.25.0</Version>
<Version>1.25.1-prerelease</Version>
<Title>Datadog APM</Title>
<Description>Manual instrumentation library for Datadog APM</Description>
</PropertyGroup>
Expand Down
6 changes: 4 additions & 2 deletions src/Datadog.Trace/TraceContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,14 @@ public void AddSpan(Span span)
}
}

_spans.Add(span);
_openSpans++;
}
}

public void CloseSpan(Span span)
{
bool ShouldTriggerPartialFlush() => Tracer.Settings.PartialFlushEnabled && _spans.Count >= Tracer.Settings.PartialFlushMinSpans;

if (span == RootSpan)
{
// lock sampling priority and set metric when root span finishes
Expand All @@ -104,9 +105,10 @@ public void CloseSpan(Span span)

lock (_spans)
{
_spans.Add(span);
_openSpans--;

if (_openSpans == 0)
if (_openSpans == 0 || ShouldTriggerPartialFlush())
{
spansToWrite = _spans.ToArray();
_spans.Clear();
Expand Down
6 changes: 6 additions & 0 deletions src/Datadog.Trace/Tracer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,12 @@ internal async Task WriteDiagnosticLog()
writer.WritePropertyName("routetemplate_resourcenames_enabled");
writer.WriteValue(Settings.RouteTemplateResourceNamesEnabled);

writer.WritePropertyName("partialflush_enabled");
writer.WriteValue(Settings.PartialFlushEnabled);

writer.WritePropertyName("partialflush_minspans");
writer.WriteValue(Settings.PartialFlushMinSpans);

writer.WritePropertyName("agent_reachable");
writer.WriteValue(agentError == null);

Expand Down
2 changes: 1 addition & 1 deletion src/Datadog.Trace/TracerConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ internal static class TracerConstants
/// </summary>
public const ulong MaxTraceId = 9_223_372_036_854_775_807;

public static readonly string AssemblyVersion = "1.25.0.0";
public static readonly string AssemblyVersion = "1.25.1.0";
}
}
4 changes: 2 additions & 2 deletions src/WindowsInstaller/WindowsInstaller.wixproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<IntermediateOutputPath>obj\$(Configuration)\$(Platform)\</IntermediateOutputPath>
<SuppressPdbOutput>True</SuppressPdbOutput>
<DefineSolutionProperties>false</DefineSolutionProperties>
<OutputName>datadog-dotnet-apm-1.25.0-$(Platform)</OutputName>
<OutputName>datadog-dotnet-apm-1.25.1-prerelease-$(Platform)</OutputName>
<TracerHomeDirectory Condition="'$(TracerHomeDirectory)' == ''">$(MSBuildThisFileDirectory)..\bin\tracer-home</TracerHomeDirectory>
<DefineConstants>InstallerVersion=1.25.0;TracerHomeDirectory=$(TracerHomeDirectory)</DefineConstants>
<DefineConstants>InstallerVersion=1.25.1;TracerHomeDirectory=$(TracerHomeDirectory)</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DefineConstants>$(DefineConstants);Debug</DefineConstants>
Expand Down
Loading