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

[BUG] Loading information from the agent info endpoint not retrieving statsd port #1802

Closed
scott-shields-github opened this issue Mar 15, 2023 · 0 comments
Labels
bug unintended behavior that has to be fixed

Comments

@scott-shields-github
Copy link

The agent /info endpoint returns data in a way that is slightly different than the trace library decodes it. Specifically, the statsd port in located in a nested config object.

Version of dd-trace-go
v1.48.0

Describe what happened:
When loading data from the /info endpoint, the statsd port is not retrieved correctly

Describe what you expected:
The statsd port should be correctly retrieved

Steps to reproduce the issue:
Create an instance of a tracer with an agent with a non-default statsd port, notice that the statsd port is not configured correctly in the tracer logs.

root@hostl:/# curl localhost:8126/info
{
	"version": "7.40.1",
	"git_commit": "05a524c",
	"endpoints": [
		"/v0.3/traces",
		"/v0.3/services",
		"/v0.4/traces",
		"/v0.4/services",
		"/v0.5/traces",
		"/v0.7/traces",
		"/profiling/v1/input",
		"/telemetry/proxy/",
		"/v0.6/stats",
		"/v0.1/pipeline_stats",
		"/appsec/proxy/",
		"/evp_proxy/v1/",
		"/evp_proxy/v2/",
		"/debugger/v1/input",
		"/dogstatsd/v1/proxy",
		"/config/set"
	],
	"feature_flags": [
		""
	],
	"client_drop_p0s": true,
	"span_meta_structs": true,
	"long_running_spans": true,
	"config": {
		"default_env": "prod",
		"target_tps": 10,
		"max_eps": 200,
		"receiver_port": 8126,
		"receiver_socket": "",
		"connection_limit": 0,
		"receiver_timeout": 0,
		"max_request_bytes": 52428800,
		"statsd_port": 8215,
		"max_memory": 0,
		"max_cpu": 0,
		"analyzed_spans_by_service": {},
		"obfuscation": {
			"elastic_search": false,
			"mongo": false,
			"sql_exec_plan": false,
			"sql_exec_plan_normalize": false,
			"http": {
				"remove_query_string": false,
				"remove_path_digits": false
			},
			"remove_stack_traces": false,
			"redis": false,
			"memcached": false
		}
	}
}
2023/03/14 17:10:23 Datadog Tracer v1.43.1 INFO: DATADOG TRACER CONFIGURATION
...
...
"agent_features":{"DropP0s":true,"Stats":true,"StatsdPort":0}}

Additional environment details (Version of Go, Operating System, etc.):
go 1.20
centos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unintended behavior that has to be fixed
Projects
None yet
Development

No branches or pull requests

2 participants