Hey lovely CF people.. I am having a proper challenge building the Open Telemetry library and auto-i

Hey lovely CF people.. I am having a proper challenge building the Open Telemetry library and auto-instrumenting it, because you are implementing exactly the same interface as say a service binding (a
fetch
method), but at least in your documentation you instruct people to invoke that in a way that is not spec compliant.

This leads to two problems:
1) I can't (easily) distinguish between a ServiceBinding and a BrowserRendering Binding
2) When I try to create a
Request
out of the parameters you specify (
/v1/acquire
) it (obviously) fails because
/v1/acquire
is not a valid URL.

Now #2 can probably be easily solved by passing in a proper URL, but that would just prevent things from crashing.

Technically I could solve #1 by instrumenting any
fetch
function with a generic wrapper and then decide which instrumentation implementation to use based on the parameters passed into the
fetch
function, but that would be pretty brittle, because I would have to hardcode exactly what you would pass into the first request.
Was this page helpful?