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

pkg/trace Test reflect for discovery endpoint #7347

Closed
wants to merge 1 commit into from

Conversation

raphaelgavache
Copy link
Member

Experimental implementation of a discovery endpoint.

curl localhost:8126/v0.5/discovery_endpoint

{
   "agent_version":"v0",
   "supported_endpoints":[
      "/v0.2/traces",
      "/v0.3/services",
      "/v0.4/services",
      "/v0.5/traces",
      "/v0.5/stats",
      "/debug/pprof/profile",
      "/debug/pprof/block",
      "/debug/vars",
      "/v0.1/spans",
      "/v0.1/services",
      "/v0.4/traces",
      "/profiling/v1/input",
      "/debug/pprof/symbol",
      "/debug/pprof/trace",
      "/debug/blockrate",
      "/v0.3/traces",
      "/debug/pprof/cmdline",
      "/spans",
      "/services",
      "/v0.2/services",
      "/debug/pprof/"
   ],
   "client_dropping":false
}

return mux
}

func (r *HTTPReceiver) attachDiscoveryHandler(mux *http.ServeMux) {
refPatterns := reflect.ValueOf(mux).Elem().FieldByName("m").MapKeys()
Copy link
Member Author

Choose a reason for hiding this comment

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

Other solution that is probably cleaner is to wrap the mux handler in a custom struct.

@raphaelgavache
Copy link
Member Author

concurrent work already started #7344
closing this one

@dd-devflow dd-devflow bot deleted the raphael/test_disc_endpoint branch April 19, 2024 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant