Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Query parameters


#1

How can i filter on pageUrl using the query parameters in the url? I know you have to secure them from possible injection but sometimes we want to measure which mailing people did follow. I think pageUrl or pageParams can be a good addition to this.


#2

Hi @oudenniel - this isn’t possible at the moment; I have forwarded your request on to our product managers. Thank you!


#3

So about pageUrl. I can only use ‘%’ But what if

-Language is part or url and we want to do FACET on it.
-Request parameter referrer is giving us info for marketing leads and can not do FACET on them or count or whatever.

What if i can also introduce keynames which can be used for FACET? So if pageUrl LIKE ‘%/%/:language/%’ FACET language. Or ‘%/%/%?%foo=:bar&%’ FACET bar

I think it makes it more flexible.

Maarten


#4

Thank you @oudenniel - I have forwarded on your request in full to our product managers!


#5

Hi @oudenniel, while directly faceting on parts of a URL isn’t possible, you can choose to send parameters on PageView events as long as you are using New Relic APM to do the Browser instrumentation. These parameters could be similar to the information in your query parameters, if you can access the information in your query parameters from the APM transaction (sometimes this is possible and other times it may not be accessible this way).

I can’t recall if that is the case for you, but if so you would follow this process: https://docs.newrelic.com/docs/insights/new-relic-insights/decorating-events/insights-custom-attributes#forwarding-attributes

In case this doesn’t work for you, @Lisa has previously passed on your needs to our product team.


#6

Our transactions don’t match our pageViews because of caching. So mixing them is a no-go. Best is to have some flexibility using patterns from url itself but thanks for thinking with us :smile:


#7

Hi Lisa, do you have any news on this feature?
Thank you!


#8

Hey @mauricio.pereira

What are you attempting to achieve? Sending over fully parameters of a URL would create a slew of URLs that are similar but differ by a minor value.

Are you trying to capture specific choices on a form or submission data? Perhaps custom attributes is a better option/solution to achieve the goal.

If you detail out what you want to achieve some more, maybe I can assist :slight_smile:


#9

Hi @acuffe, thank you for your reply.

I have an endpoint which is called about 30k rpm. Some of these calls (about 500 rpm) have a specific query param set to true which makes the request take much longer. I want to track these 500 rpm with that specific query param without the noise of the other calls. I don’t know much about custom attributes. Should I use the addCustomParameter method whenever I receive that query param?


#10

Hey @mauricio.pereira

Yep you’re pretty much spot on. So first thing is whether you’re tracking this request as a frontend request using New Relic browser or is the endpoint a backend process that’s monitored with New Relic APM.

If it’s APM, then you would drop the customer attribute function into the request handling of the backend endpoint so that when

Where (Parameter == True)
{
newrelic_add_custom_parameter(“ParameterName”, $Value)
}

So $value I guess will always be true in this case, but it’s purely pseudo code on the logic of it.

Now only transactions that have this parameter set will have this additional column to query against in Insights. So writing an Insights query for APM would be

SELECT count(*) FROM Transaction WHERE appName = "Endpoint_AppName" And ParameterName = "True"

Meaning your count is only of the backend requests that were that parameter set to true. Then you can start analysing the average response time etc as you would normally with Insights.

If its on the frontend that you’re tracking this and therefore are using New Relic browser and capturing frontend time of items then you may want to use the addCustomAttribute option to tag that parameters data onto your frontend pageload.

I imagine it’s the first option and you’re maybe using one of the agents like the PHP/Python/Node/Ruby/.NEt/Java/Go agents. So if it is you just need to use that agents specific API function . call for adding a custom attribute.

Let me know if that makes sense!