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

Add ddprofilingextension #33156

Merged
merged 43 commits into from
Feb 4, 2025
Merged

Add ddprofilingextension #33156

merged 43 commits into from
Feb 4, 2025

Conversation

mackjmr
Copy link
Member

@mackjmr mackjmr commented Jan 21, 2025

What does this PR do?

This PR adds a ddprofiling extension. This extension starts the DD profiler, and is supported in 2 setups:

  • OTel Agent: The profiles are sent through the trace agent comp which is spun up by the OTel Agent
  • OSS Collector: The profiles are sent directly to the intake. Setting the API key is required, and the extension will fail on Start if not provided.

What does this PR NOT do?

This PR doesn't:

How to run the extension locally (OTel Agent)

Step 1: Build And Run the core agent:

inv agent.build && ./bin/agent/agent run -c bin/agent/dist/datadog.yaml

Step 2: Build and run the otel agent, with the ddprofiling extension in the collector config.

inv otel-agent.build && ./bin/otel-agent/otel-agent run --config collector.yaml

You can use this config for example:

receivers:
  otlp:
    protocols:
      http:
        endpoint: "localhost:4318"
      grpc:
        endpoint: "localhost:4317"


processors:
  batch:
    send_batch_max_size: 1000
    send_batch_size: 100
    timeout: 10s

exporters:
  datadog:
    api:
      key: ${env:DD_API_KEY}

extensions:
  ddprofiling: 
    profiler_options:
      period: 10

service:
  extensions: [ddprofiling]
  pipelines:
    traces:
      receivers: [otlp]
      processors: [batch]
      exporters: [datadog]

How to run the extension locally (OSS Collector)

Step 1: Install the OCB Builder: https://opentelemetry.io/docs/collector/custom-collector/.

Step 2: Create the manifest
builder-config.yaml, which includes the ddprofilingextension. Please note the path and replaces for ddprofilingextension/def, ddprofilingextension/impl and comp/trace/agent/def which you will need to update based on your current directory.

connectors:
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector
    v0.117.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector
    v0.117.0
dist:
  description: Basic OTel Collector distribution for Developers
  name: otelcol-custom
  output_path: ./otelcol-dev3
exporters:
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter
    v0.117.0
extensions:
- gomod: github.com/DataDog/datadog-agent/comp/otelcol/ddprofilingextension/impl v0.61.0
  path: ../datadog-agent/comp/otelcol/ddprofilingextension/impl
processors:
- gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.117.0
providers:
- gomod: go.opentelemetry.io/collector/confmap/provider/envprovider v1.23.0
- gomod: go.opentelemetry.io/collector/confmap/provider/fileprovider v1.23.0
- gomod: go.opentelemetry.io/collector/confmap/provider/httpprovider v1.23.0
- gomod: go.opentelemetry.io/collector/confmap/provider/httpsprovider v1.23.0
- gomod: go.opentelemetry.io/collector/confmap/provider/yamlprovider v1.23.0
receivers:
- gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.117.0
replaces:
- github.com/DataDog/datadog-agent/comp/otelcol/ddprofilingextension/def => /Users/mackenzie.jomard/DEV/oteldev/datadog-agent/comp/otelcol/ddprofilingextension/def
- github.com/DataDog/datadog-agent/comp/trace/agent/def => /Users/mackenzie.jomard/DEV/oteldev/datadog-agent/comp/trace/agent/def

Step 3: Generate the code
Run ./ocb --config=./builder-config.yaml. This will generate the code necessary to run the collector in folder otelcol-dev3 (specified in dist in step above).

Step 4: Run the code
cd otelcol-dev3

Create collector config with ddprofiling extension:

receivers:
  otlp:
    protocols:
      http:
        endpoint: "localhost:4318"
      grpc:
        endpoint: "localhost:4317"


processors:
  batch:
    send_batch_max_size: 1000
    send_batch_size: 100
    timeout: 10s

exporters:
  datadog:
    api:
      key: ${env:DD_API_KEY}

extensions:
  ddprofiling: 
    api:
      key: ${env:DD_API_KEY}
    profiler_options:
      period: 10

service:
  extensions: [ddprofiling]
  pipelines:
    traces:
      receivers: [otlp]
      processors: [batch]
      exporters: [datadog]

Run with:
go run main.go components.go main_others.go --config collector.yaml

Motivation

OTEL-2310

Describe how you validated your changes

Possible Drawbacks / Trade-offs

Additional Notes

Copy link

cit-pr-commenter bot commented Jan 21, 2025

Go Package Import Differences

Baseline: d6ef294
Comparison: d540f3e

binaryosarchchange
agentlinuxamd64
+8, -0
+github.com/DataDog/datadog-agent/pkg/trace/config
+github.com/DataDog/datadog-agent/pkg/trace/sampler
+github.com/DataDog/datadog-agent/pkg/trace/stats
+github.com/DataDog/datadog-agent/pkg/trace/transform
+github.com/DataDog/datadog-agent/pkg/trace/version
+github.com/DataDog/datadog-agent/pkg/trace/watchdog
+github.com/DataDog/go-runtime-metrics-internal/pkg/runtimemetrics
+gopkg.in/DataDog/dd-trace-go.v1/internal/civisibility/utils/telemetry
agentlinuxarm64
+8, -0
+github.com/DataDog/datadog-agent/pkg/trace/config
+github.com/DataDog/datadog-agent/pkg/trace/sampler
+github.com/DataDog/datadog-agent/pkg/trace/stats
+github.com/DataDog/datadog-agent/pkg/trace/transform
+github.com/DataDog/datadog-agent/pkg/trace/version
+github.com/DataDog/datadog-agent/pkg/trace/watchdog
+github.com/DataDog/go-runtime-metrics-internal/pkg/runtimemetrics
+gopkg.in/DataDog/dd-trace-go.v1/internal/civisibility/utils/telemetry
agentwindowsamd64
+7, -0
+github.com/DataDog/datadog-agent/pkg/trace/sampler
+github.com/DataDog/datadog-agent/pkg/trace/stats
+github.com/DataDog/datadog-agent/pkg/trace/transform
+github.com/DataDog/datadog-agent/pkg/trace/version
+github.com/DataDog/datadog-agent/pkg/trace/watchdog
+github.com/DataDog/go-runtime-metrics-internal/pkg/runtimemetrics
+gopkg.in/DataDog/dd-trace-go.v1/internal/civisibility/utils/telemetry
agentdarwinamd64
+9, -0
+github.com/DataDog/datadog-agent/pkg/trace/config
+github.com/DataDog/datadog-agent/pkg/trace/sampler
+github.com/DataDog/datadog-agent/pkg/trace/stats
+github.com/DataDog/datadog-agent/pkg/trace/transform
+github.com/DataDog/datadog-agent/pkg/trace/version
+github.com/DataDog/datadog-agent/pkg/trace/watchdog
+github.com/DataDog/go-runtime-metrics-internal/pkg/runtimemetrics
+gopkg.in/DataDog/dd-trace-go.v1/internal/civisibility/utils/telemetry
+gopkg.in/ini.v1
agentdarwinarm64
+9, -0
+github.com/DataDog/datadog-agent/pkg/trace/config
+github.com/DataDog/datadog-agent/pkg/trace/sampler
+github.com/DataDog/datadog-agent/pkg/trace/stats
+github.com/DataDog/datadog-agent/pkg/trace/transform
+github.com/DataDog/datadog-agent/pkg/trace/version
+github.com/DataDog/datadog-agent/pkg/trace/watchdog
+github.com/DataDog/go-runtime-metrics-internal/pkg/runtimemetrics
+gopkg.in/DataDog/dd-trace-go.v1/internal/civisibility/utils/telemetry
+gopkg.in/ini.v1
iot-agentlinuxamd64
+9, -0
+github.com/DataDog/datadog-agent/pkg/trace/config
+github.com/DataDog/datadog-agent/pkg/trace/sampler
+github.com/DataDog/datadog-agent/pkg/trace/stats
+github.com/DataDog/datadog-agent/pkg/trace/transform
+github.com/DataDog/datadog-agent/pkg/trace/version
+github.com/DataDog/datadog-agent/pkg/trace/watchdog
+github.com/DataDog/go-runtime-metrics-internal/pkg/runtimemetrics
+gopkg.in/DataDog/dd-trace-go.v1/internal/civisibility/utils/telemetry
+gopkg.in/ini.v1
iot-agentlinuxarm64
+9, -0
+github.com/DataDog/datadog-agent/pkg/trace/config
+github.com/DataDog/datadog-agent/pkg/trace/sampler
+github.com/DataDog/datadog-agent/pkg/trace/stats
+github.com/DataDog/datadog-agent/pkg/trace/transform
+github.com/DataDog/datadog-agent/pkg/trace/version
+github.com/DataDog/datadog-agent/pkg/trace/watchdog
+github.com/DataDog/go-runtime-metrics-internal/pkg/runtimemetrics
+gopkg.in/DataDog/dd-trace-go.v1/internal/civisibility/utils/telemetry
+gopkg.in/ini.v1
heroku-agentlinuxamd64
+9, -0
+github.com/DataDog/datadog-agent/pkg/trace/config
+github.com/DataDog/datadog-agent/pkg/trace/sampler
+github.com/DataDog/datadog-agent/pkg/trace/stats
+github.com/DataDog/datadog-agent/pkg/trace/transform
+github.com/DataDog/datadog-agent/pkg/trace/version
+github.com/DataDog/datadog-agent/pkg/trace/watchdog
+github.com/DataDog/go-runtime-metrics-internal/pkg/runtimemetrics
+gopkg.in/DataDog/dd-trace-go.v1/internal/civisibility/utils/telemetry
+gopkg.in/ini.v1
cluster-agentlinuxamd64
+9, -0
+github.com/DataDog/datadog-agent/pkg/trace/config
+github.com/DataDog/datadog-agent/pkg/trace/sampler
+github.com/DataDog/datadog-agent/pkg/trace/stats
+github.com/DataDog/datadog-agent/pkg/trace/transform
+github.com/DataDog/datadog-agent/pkg/trace/version
+github.com/DataDog/datadog-agent/pkg/trace/watchdog
+github.com/DataDog/go-runtime-metrics-internal/pkg/runtimemetrics
+gopkg.in/DataDog/dd-trace-go.v1/internal/civisibility/utils/telemetry
+gopkg.in/ini.v1
cluster-agentlinuxarm64
+9, -0
+github.com/DataDog/datadog-agent/pkg/trace/config
+github.com/DataDog/datadog-agent/pkg/trace/sampler
+github.com/DataDog/datadog-agent/pkg/trace/stats
+github.com/DataDog/datadog-agent/pkg/trace/transform
+github.com/DataDog/datadog-agent/pkg/trace/version
+github.com/DataDog/datadog-agent/pkg/trace/watchdog
+github.com/DataDog/go-runtime-metrics-internal/pkg/runtimemetrics
+gopkg.in/DataDog/dd-trace-go.v1/internal/civisibility/utils/telemetry
+gopkg.in/ini.v1
cluster-agent-cloudfoundrylinuxamd64
+8, -0
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/azure
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/cachedfetch
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ec2
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ecs
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/gce
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/httputils
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/validate
cluster-agent-cloudfoundrylinuxarm64
+8, -0
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/azure
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/cachedfetch
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ec2
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ecs
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/gce
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/httputils
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/validate
dogstatsdlinuxamd64
+8, -0
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/azure
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/cachedfetch
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ec2
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ecs
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/gce
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/httputils
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/validate
dogstatsdlinuxarm64
+8, -0
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/azure
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/cachedfetch
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ec2
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ecs
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/gce
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/httputils
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/validate
process-agentlinuxamd64
+8, -0
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/azure
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/cachedfetch
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ec2
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ecs
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/gce
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/httputils
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/validate
process-agentlinuxarm64
+8, -0
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/azure
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/cachedfetch
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ec2
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ecs
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/gce
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/httputils
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/validate
process-agentwindowsamd64
+8, -0
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/azure
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/cachedfetch
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ec2
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ecs
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/gce
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/httputils
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/validate
process-agentdarwinamd64
+8, -0
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/azure
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/cachedfetch
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ec2
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ecs
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/gce
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/httputils
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/validate
process-agentdarwinarm64
+8, -0
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/azure
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/cachedfetch
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ec2
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ecs
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/gce
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/httputils
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/validate
heroku-process-agentlinuxamd64
+8, -0
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/azure
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/cachedfetch
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ec2
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ecs
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/gce
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/httputils
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/validate
security-agentlinuxamd64
+8, -0
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/azure
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/cachedfetch
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ec2
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ecs
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/gce
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/httputils
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/validate
security-agentlinuxarm64
+8, -0
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/azure
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/cachedfetch
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ec2
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ecs
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/gce
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/httputils
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/validate
security-agentwindowsamd64
+8, -0
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/azure
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/cachedfetch
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ec2
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ecs
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/gce
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/httputils
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/validate
serverlesslinuxamd64
+2, -0
+github.com/DataDog/go-runtime-metrics-internal/pkg/runtimemetrics
+gopkg.in/DataDog/dd-trace-go.v1/internal/civisibility/utils/telemetry
serverlesslinuxarm64
+2, -0
+github.com/DataDog/go-runtime-metrics-internal/pkg/runtimemetrics
+gopkg.in/DataDog/dd-trace-go.v1/internal/civisibility/utils/telemetry
system-probelinuxamd64
+8, -0
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/azure
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/cachedfetch
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ec2
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ecs
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/gce
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/httputils
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/validate
system-probelinuxarm64
+8, -0
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/azure
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/cachedfetch
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ec2
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ecs
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/gce
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/httputils
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/validate
system-probewindowsamd64
+8, -0
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/azure
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/cachedfetch
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ec2
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ecs
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/gce
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/httputils
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/validate
trace-agentlinuxamd64
+8, -0
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/azure
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/cachedfetch
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ec2
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ecs
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/gce
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/httputils
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/validate
trace-agentlinuxarm64
+8, -0
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/azure
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/cachedfetch
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ec2
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ecs
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/gce
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/httputils
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/validate
trace-agentwindowsamd64
+8, -0
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/azure
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/cachedfetch
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ec2
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ecs
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/gce
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/httputils
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/validate
trace-agentdarwinamd64
+8, -0
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/azure
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/cachedfetch
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ec2
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ecs
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/gce
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/httputils
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/validate
trace-agentdarwinarm64
+8, -0
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/azure
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/cachedfetch
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ec2
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ecs
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/gce
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/httputils
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/validate
heroku-trace-agentlinuxamd64
+8, -0
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/azure
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/cachedfetch
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ec2
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/ecs
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/gce
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/httputils
+gopkg.in/DataDog/dd-trace-go.v1/internal/hostname/validate

@github-actions github-actions bot added team/opentelemetry OpenTelemetry team long review PR is complex, plan time to review it labels Jan 21, 2025
Copy link

cit-pr-commenter bot commented Jan 22, 2025

Regression Detector

Regression Detector Results

Metrics dashboard
Target profiles
Run ID: 0164609c-7208-4193-be49-4969daaee072

Baseline: d6ef294
Comparison: d540f3e
Diff

Optimization Goals: ✅ No significant changes detected

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI trials links
uds_dogstatsd_to_api_cpu % cpu utilization +0.58 [-0.29, +1.46] 1 Logs
quality_gate_idle memory utilization +0.55 [+0.51, +0.60] 1 Logs bounds checks dashboard
tcp_syslog_to_blackhole ingress throughput +0.14 [+0.07, +0.22] 1 Logs
file_tree memory utilization +0.07 [+0.00, +0.13] 1 Logs
file_to_blackhole_1000ms_latency egress throughput +0.06 [-0.72, +0.84] 1 Logs
file_to_blackhole_300ms_latency egress throughput +0.02 [-0.61, +0.66] 1 Logs
uds_dogstatsd_to_api ingress throughput +0.02 [-0.26, +0.29] 1 Logs
file_to_blackhole_0ms_latency_http1 egress throughput +0.01 [-0.84, +0.87] 1 Logs
file_to_blackhole_500ms_latency egress throughput +0.00 [-0.79, +0.80] 1 Logs
file_to_blackhole_0ms_latency egress throughput +0.00 [-0.86, +0.87] 1 Logs
tcp_dd_logs_filter_exclude ingress throughput -0.00 [-0.01, +0.01] 1 Logs
file_to_blackhole_0ms_latency_http2 egress throughput -0.01 [-0.90, +0.88] 1 Logs
file_to_blackhole_100ms_latency egress throughput -0.01 [-0.76, +0.74] 1 Logs
file_to_blackhole_1000ms_latency_linear_load egress throughput -0.38 [-0.84, +0.08] 1 Logs
quality_gate_idle_all_features memory utilization -0.59 [-0.67, -0.51] 1 Logs bounds checks dashboard
quality_gate_logs % cpu utilization -1.67 [-4.69, +1.35] 1 Logs

Bounds Checks: ✅ Passed

perf experiment bounds_check_name replicates_passed links
file_to_blackhole_0ms_latency lost_bytes 10/10
file_to_blackhole_0ms_latency memory_usage 10/10
file_to_blackhole_0ms_latency_http1 lost_bytes 10/10
file_to_blackhole_0ms_latency_http1 memory_usage 10/10
file_to_blackhole_0ms_latency_http2 lost_bytes 10/10
file_to_blackhole_0ms_latency_http2 memory_usage 10/10
file_to_blackhole_1000ms_latency memory_usage 10/10
file_to_blackhole_1000ms_latency_linear_load memory_usage 10/10
file_to_blackhole_100ms_latency lost_bytes 10/10
file_to_blackhole_100ms_latency memory_usage 10/10
file_to_blackhole_300ms_latency lost_bytes 10/10
file_to_blackhole_300ms_latency memory_usage 10/10
file_to_blackhole_500ms_latency lost_bytes 10/10
file_to_blackhole_500ms_latency memory_usage 10/10
quality_gate_idle intake_connections 10/10 bounds checks dashboard
quality_gate_idle memory_usage 10/10 bounds checks dashboard
quality_gate_idle_all_features intake_connections 10/10 bounds checks dashboard
quality_gate_idle_all_features memory_usage 10/10 bounds checks dashboard
quality_gate_logs intake_connections 10/10
quality_gate_logs lost_bytes 10/10
quality_gate_logs memory_usage 10/10

Explanation

Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%

Performance changes are noted in the perf column of each table:

  • ✅ = significantly better comparison variant performance
  • ❌ = significantly worse comparison variant performance
  • ➖ = no significant change in performance

A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".

For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:

  1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

  2. Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.

  3. Its configuration does not mark it "erratic".

CI Pass/Fail Decision

Passed. All Quality Gates passed.

  • quality_gate_logs, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check lost_bytes: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_idle_all_features, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_idle_all_features, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_idle, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_idle, bounds check memory_usage: 10/10 replicas passed. Gate passed.

@ogaca-dd
Copy link
Contributor

Package import difference is explained by this change

@mackjmr mackjmr marked this pull request as ready for review January 27, 2025 13:12
@mackjmr mackjmr requested review from a team as code owners January 27, 2025 13:12
@mackjmr mackjmr requested a review from dinooliva January 27, 2025 13:12
@mackjmr mackjmr requested a review from a team as a code owner January 31, 2025 09:56
@mackjmr mackjmr requested a review from a team as a code owner February 3, 2025 12:31
@mackjmr mackjmr requested a review from a team as a code owner February 3, 2025 13:40
comp/otelcol/ddprofilingextension/README.md Outdated Show resolved Hide resolved
.github/CODEOWNERS Outdated Show resolved Hide resolved

// profiler.BlockProfile,
// profiler.MutexProfile,
// profiler.GoroutineProfile,
Copy link
Contributor

Choose a reason for hiding this comment

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

To remove?

Copy link
Member Author

Choose a reason for hiding this comment

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

Added config option to set these.

comp/otelcol/ddprofilingextension/impl/extension_test.go Outdated Show resolved Hide resolved
comp/otelcol/ddprofilingextension/impl/factory.go Outdated Show resolved Hide resolved
if v, ok := c.Agent.Receiver.Handlers[endpoint]; ok {
return v
}
return nil
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the caller is supposed to handle nil?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, the caller handles the nil

@@ -15,6 +15,9 @@ exporters:
extensions:
ddflare:
include_metadata: true # Set to true for testing; adjust for production.
# ddprofiling:
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason to have this code commented?

Copy link
Member Author

Choose a reason for hiding this comment

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

This will break OCB until: open-telemetry/opentelemetry-collector#12162 is fixed. The PR is up, but not merged yet.

Comment on lines 108 to 112
// low, but can be enabled as needed.

// profiler.BlockProfile,
// profiler.MutexProfile,
// profiler.GoroutineProfile,
Copy link
Member

Choose a reason for hiding this comment

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

can we add these as config options ? We should be able to enable them on demand, with default off

Copy link
Member Author

Choose a reason for hiding this comment

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

added: e1b4473 👍

@agent-platform-auto-pr
Copy link
Contributor

agent-platform-auto-pr bot commented Feb 3, 2025

Uncompressed package size comparison

Comparison with ancestor d6ef294c33388e2c94023d80d7fa5a4381862e09

Diff per package
package diff status size ancestor threshold
datadog-heroku-agent-amd64-deb 0.16MB ⚠️ 445.67MB 445.51MB 0.50MB
datadog-agent-amd64-deb 0.14MB ⚠️ 873.43MB 873.29MB 0.50MB
datadog-agent-x86_64-rpm 0.14MB ⚠️ 883.17MB 883.03MB 0.50MB
datadog-agent-x86_64-suse 0.14MB ⚠️ 883.17MB 883.03MB 0.50MB
datadog-agent-arm64-deb 0.14MB ⚠️ 861.32MB 861.18MB 0.50MB
datadog-agent-aarch64-rpm 0.14MB ⚠️ 871.04MB 870.90MB 0.50MB
datadog-iot-agent-amd64-deb 0.11MB ⚠️ 86.22MB 86.11MB 0.50MB
datadog-iot-agent-x86_64-rpm 0.11MB ⚠️ 86.29MB 86.18MB 0.50MB
datadog-iot-agent-x86_64-suse 0.11MB ⚠️ 86.28MB 86.18MB 0.50MB
datadog-iot-agent-aarch64-rpm 0.10MB ⚠️ 82.56MB 82.45MB 0.50MB
datadog-iot-agent-arm64-deb 0.10MB ⚠️ 82.49MB 82.38MB 0.50MB
datadog-dogstatsd-x86_64-rpm 0.05MB ⚠️ 59.16MB 59.11MB 0.50MB
datadog-dogstatsd-x86_64-suse 0.05MB ⚠️ 59.16MB 59.11MB 0.50MB
datadog-dogstatsd-amd64-deb 0.05MB ⚠️ 59.09MB 59.03MB 0.50MB
datadog-dogstatsd-arm64-deb 0.04MB ⚠️ 56.56MB 56.52MB 0.50MB

Decision

⚠️ Warning

@agent-platform-auto-pr
Copy link
Contributor

agent-platform-auto-pr bot commented Feb 3, 2025

Test changes on VM

Use this command from test-infra-definitions to manually test this PR changes on a VM:

inv aws.create-vm --pipeline-id=54813371 --os-family=ubuntu

Note: This applies to commit d540f3e

Copy link
Contributor

@misteriaud misteriaud left a comment

Choose a reason for hiding this comment

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

LGTM for Agent Runtime owned files 👍

@agent-platform-auto-pr
Copy link
Contributor

Static quality checks ✅

Please find below the results from static quality gates

Info

Result Quality gate On disk size On disk size limit On wire size On wire size limit
static_quality_gate_agent_deb_amd64 844.3MiB 858.45MiB 203.54MiB 214.3MiB
static_quality_gate_docker_agent_amd64 929.13MiB 942.69MiB 310.68MiB 321.56MiB

@mackjmr
Copy link
Member Author

mackjmr commented Feb 4, 2025

/merge

@dd-devflow
Copy link

dd-devflow bot commented Feb 4, 2025

Devflow running: /merge

View all feedbacks in Devflow UI.


2025-02-04 16:24:27 UTC ℹ️ MergeQueue: pull request added to the queue

The median merge time in main is 27m.


2025-02-04 17:24:25 UTC ℹ️ MergeQueue: This merge request was merged

@dd-mergequeue dd-mergequeue bot merged commit fc3796f into main Feb 4, 2025
250 of 251 checks passed
@dd-mergequeue dd-mergequeue bot deleted the mackjmr/ddprofilingextension branch February 4, 2025 17:24
@github-actions github-actions bot added this to the 7.64.0 milestone Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/no-changelog long review PR is complex, plan time to review it qa/done QA done before merge and regressions are covered by tests team/opentelemetry OpenTelemetry team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants