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

Unclear documentation for custom observability backend URLs #752

Open
harveyrendell opened this issue Nov 14, 2023 · 4 comments
Open

Unclear documentation for custom observability backend URLs #752

harveyrendell opened this issue Nov 14, 2023 · 4 comments
Labels
backend/newrelic documentation Improvements or additions to documentation

Comments

@harveyrendell
Copy link

Describe your use-case which is not covered by existing documentation.

Hi there,

I am trying to configure a custom observability backend for New Relic using the following template https://one.newrelic.com/distributed-tracing?account=********&state=${traceId} as described in the url template example:

Trace visualization URL template
e.g. 'https://my-observability.example.com:5601/traces/\$\{traceId}'

However this causes pipelines to fail with the following errors:


groovy.lang.GroovyRuntimeException: Failed to parse template script (your template may contain an error or be trying to use expressions not currently supported): startup failed:

GStringTemplateScript39.groovy: 2: unexpected char: '\' @ line 2, column 134.
   ****&state=\$\{traceid}

and after modifying it to remove the additional backslashes:

groovy.lang.MissingPropertyException: No such property: traceid for class: groovy.lang.Binding

Is traceId supposed to be set here? or is there some other prerequisite before I can configure a custom backend. These pipelines are using the multibranch pipeline type.

Thanks

Reference any relevant documentation, other materials or issues/pull requests that can be used for inspiration.

<f:entry title="Trace visualization URL template" field="traceVisualisationUrlTemplate" description="e.g. 'https://my-observability.example.com:5601/traces/\$\{traceId}'">

@harveyrendell harveyrendell added the documentation Improvements or additions to documentation label Nov 14, 2023
@cyrille-leclerc
Copy link
Contributor

You are right that documentation is poor.
We are incrementally improving. See

public interface TemplateBindings {
String BACKEND_NAME = "backendName";
String BACKEND_24_24_ICON_URL = "backend24x24IconUrl";
String SERVICE_NAME = "serviceName";
String SERVICE_NAMESPACE = "serviceNamespace";
String SERVICE_NAMESPACE_AND_NAME="serviceNamespaceAndName";
String ROOT_SPAN_NAME = "rootSpanName";
String TRACE_ID = "traceId";
String SPAN_ID = "spanId";
/**
* As {@link Instant}
*/
String START_TIME = "startTime";
/**
* As {@link Instant}
*/
String END_TIME = "endTime";
}

You should use traceId instead of traceid

@cyrille-leclerc
Copy link
Contributor

There is a bug in the visualization, you should not use \ escape chars.

Please enter an url template like https://example.com/${traceId} and it will produce urls like https://example.com/4909241c7fe6438a95a25859375c2d07

@cyrille-leclerc
Copy link
Contributor

@DuMaM
Copy link

DuMaM commented Dec 12, 2023

Hi,
I was fighting with NewRelic support for about a week.
According to them, the value of state query is different from a trace ID.
It's some random number connected with user session returned from NewRelic backend.
Currently, there is no way to add tarceID URL which will redirect you to the Web UI page.
You can only add URL to the dashboard to be visible for your users.

https://one.newrelic.com/distributed-tracing?account=********&state=${traceId}

btw. @cyrille-leclerc if you want you can put this into docs 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend/newrelic documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants