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
26 changes: 26 additions & 0 deletions ci/config.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[Main]
# Enable the trace agent.
apm_enabled = true

# trace-agent will use this hostname when reporting to the Datadog backend.
# default: stdout of `hostname`
hostname = myhost

# trace-agent will use this api key when reporting to the Datadog backend.
# no default.
api_key = "api_key"

# trace-agent will bind to this host when listening for traces
# additionally trace-agent expects dogstatsd to be bound to the same host
# for forwarding internal monitoring metrics
bind_host = 127.0.0.1

# trace-agent expects dogstatsd to be listening over UDP on this port
# this is where it will forward internal monitoring metrics
dogstatsd_port = 8125

# trace-agent will log it's output with this log level
log_level = INFO

[trace.api]
endpoint = https://trace.agent.datadoghq.com
3 changes: 3 additions & 0 deletions ci/runtraceagent.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# This script downloads the 5.19.0 version of the trace-agent and runs it in the background for the integration tests
Invoke-WebRequest https://github.com/DataDog/datadog-trace-agent/releases/download/5.19.0/trace-agent-windows-5.19.0.exe -OutFile trace-agent-windows.exe
Start-Process trace-agent-windows.exe "--ddconfig $PSScriptRoot\config.ini"
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DefineConstants>TRACE;DEBUG;NET45_TESTS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<DefineConstants>TRACE;NET45_TESTS</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
Expand Down
4 changes: 3 additions & 1 deletion src/Datadog.Trace.Tests/TracerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ public void BuildSpan_NoParameter_DefaultParameters()
var span = (Span)builder.Start();
#if NETCOREAPP2_0
Assert.Equal("testhost", span.ServiceName);
#else
#elif NET45_TESTS
Assert.Equal("Datadog.Trace.Tests.Net45", span.ServiceName);
#else
Assert.Equal("Datadog.Trace.Tests", span.ServiceName);
#endif
Assert.Equal("Op1", span.OperationName);
}
Expand Down