Tracing Troubleshooting for Cordova
Learn how to troubleshoot your tracing setup.
If you need help managing transactions or spans, start with this page. If you need additional help, you can ask on GitHub. Customers on a paid plan may also contact support.
Integrations usually name transactions automatically. To change a transaction's name before it's sent, use beforeSendTransaction:
Sentry.init({
beforeSendTransaction(event) {
if (event.transaction.startsWith("/users/")) {
event.transaction = "/users/:id";
}
return event;
},
});
Sentry.init({
beforeSendTransaction(event) {
if (event.transaction.startsWith("/users/")) {
event.transaction = "/users/:id";
}
return event;
},
});
Currently, every tag has a maximum character limit of 200 characters. Tags over the 200 character limit will become truncated, losing potentially important information. To retain this data, you can split data over several tags instead.
For example, a 200+ character tag like this:
https://empowerplant.io/api/0/projects/ep/setup_form/?user_id=314159265358979323846264338327&tracking_id=EasyAsABC123OrSimpleAsDoReMi&product_name=PlantToHumanTranslator&product_id=161803398874989484820458683436563811772030917980576
...will become truncated to:
https://empowerplant.io/api/0/projects/ep/setup_form/?user_id=314159265358979323846264338327&tracking_id=EasyAsABC123OrSimpleAsDoReMi&product_name=PlantToHumanTranslator&product_id=1618033988749894848
Instead of using tags, it is recommended to add data to spans as attributes. Using span.setAttribute() allows to add data with arbitrary length to a span. You can add as many attributes to your span as you want.
const baseUrl = "https://empowerplant.io";
const endpoint = "/api/0/projects/ep/setup_form";
const parameters = {
user_id: 314159265358979323846264338327,
tracking_id: "EasyAsABC123OrSimpleAsDoReMi",
product_name: PlantToHumanTranslator,
product_id: 161803398874989484820458683436563811772030917980576,
};
startSpan(
{
op: "http.client",
name: "setup form",
// you can add attributes when starting the span
attributes: {
baseUrl,
endpoint,
},
},
(span) => {
// or you can add attributes to an existing span
for (const key of parameters) {
span.setAttribute(`parameters.${key}`, parameters[key]);
}
// do something to be measured
},
);
const baseUrl = "https://empowerplant.io";
const endpoint = "/api/0/projects/ep/setup_form";
const parameters = {
user_id: 314159265358979323846264338327,
tracking_id: "EasyAsABC123OrSimpleAsDoReMi",
product_name: PlantToHumanTranslator,
product_id: 161803398874989484820458683436563811772030917980576,
};
startSpan(
{
op: "http.client",
name: "setup form",
// you can add attributes when starting the span
attributes: {
baseUrl,
endpoint,
},
},
(span) => {
// or you can add attributes to an existing span
for (const key of parameters) {
span.setAttribute(`parameters.${key}`, parameters[key]);
}
// do something to be measured
},
);
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").