This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$TRACE_ID=($RANDOM % 1000000) | |
$SPAN_ID=($RANDOM % 1000000) | |
$START=$(date +%s%N) | |
sleep 2 | |
$DURATION=$(($(date +%s%N) - $START)) | |
$headers = @{"Content-Type" = "application/json"} | |
$url = "http://localhost:8126/v0.3/traces" | |
$parm = @{"trace_id"=$TRACE_ID; "span_id"=$SPAN_ID; "name"='azuretest'; "resource"='/home'; "service"='none'; | |
"type"='web'; "start"=$START; "duration"=$DURATION } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: | |
repository: datadog/agent | |
tag: latest | |
pullPolicy: IfNotPresent | |
nameOverride: "" | |
fullnameOverride: "" | |
datadog: | |
apiKey: xxx | |
appKey: xxx | |
name: datadog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RequestMapping | |
public @ResponseBody String coffeeHouseIndex() { | |
if (GlobalTracer.get() != null && GlobalTracer.get().activeSpan() != null) { | |
try { | |
GlobalTracer.get().activeSpan(); | |
if (setPriority.get() == null) { | |
setPriority.compareAndSet(null, GlobalTracer.get().activeSpan().getClass().getDeclaredMethod("setSamplingPriority", int.class)); | |
} | |
setPriority.get().invoke(GlobalTracer.get().activeSpan(), 2 ); | |
} catch(Exception e) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
name: basket | |
spec: | |
paused: true | |
template: | |
metadata: | |
labels: | |
app: eshop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rem Set environment variables | |
SET CORECLR_ENABLE_PROFILING=1 | |
SET CORECLR_PROFILER={846F5F1C-F9AE-4B07-969E-05C26BC060D8} | |
SET CORECLR_PROFILER_PATH=%PROGRAMFILES%\Datadog\.NET Tracer\Datadog.Trace.ClrProfiler.Native.dll | |
SET DD_INTEGRATIONS=%PROGRAMFILES%\Datadog\.NET Tracer\integrations.json | |
SET DD_DOTNET_TRACER_HOME=%PROGRAMFILES%\Datadog\.NET Tracer | |
rem Start application | |
dotnet.exe example.dll |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
custom_metrics: | |
- name: sqlserver.buffer.page_lookups | |
counter_name: Page lookups/sec | |
- name: sqlserver.buffer.page_reads | |
counter_name: Page reads/sec | |
- name: sqlserver.workload.queued_requests | |
counter_name: Queued Requests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# install the Datadog agent | |
DD_AGENT_MAJOR_VERSION=7 DD_API_KEY=xxx DD_TAGS="env:edp" DD_SITE="datadoghq.eu" bash -c "$(curl -L https://raw.githubusercontent.com/DataDog/datadog-agent/master/cmd/agent/install_script.sh)" | |
# Enable logs and process | |
sudo sed -i '/# logs_enabled: false/a logs_enabled: true' /etc/datadog-agent/datadog.yaml | |
sudo sed -i '/# process_config:/a process_config:\n\ \ \enabled: "true"' /etc/datadog-agent/datadog.yaml | |
# Enable network |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
init_config: | |
instances: | |
- type: | |
- Information | |
- Critical | |
- Error | |
- Warning | |
- Information | |
- Audit Failure | |
- Audit Success |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Download agent | |
(Invoke-WebRequest https://s3.amazonaws.com/ddagent-windows-stable/datadog-agent-7-latest.amd64.msi -OutFile c:\datadog-agent-7-latest.amd64.msi) | |
# Download .NET Tracer v1.13x64 .msi | |
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | |
(Invoke-WebRequest https://github.com/DataDog/dd-trace-dotnet/releases/download/v1.13.0/datadog-dotnet-apm-1.13.0-x64.msi -OutFile c:\datadog-dotnet-apm-1.13.0-x64.msi) | |
# Start the Datadog agent | |
(Start-Process -Wait msiexec -ArgumentList '/qn /i c:\datadog-agent-7-latest.amd64.msi APIKEY=xxx HOSTNAME="my_hostname" TAGS="mytag1,mytag2"') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -d -v ~/opt/couchbase/var/lib/couchbase/logs/*.log --restart always --name db -p 8091-8094:8091-8094 -p 11210:11210 -l com.datadoghq.ad.check_names='["couchbase"]' -l com.datadoghq.ad.init_configs='[{}]' -l com.datadoghq.ad.instances='[{"server":"http://%%host%%:8091","query_monitoring_url":"http://%%host%%:8093","username":"Administrator","password":"admin123"}]' -l com.datadoghq.ad.logs='[{"source":"couchbase", "service":"db"}]' couchbase |