-
Notifications
You must be signed in to change notification settings - Fork 115
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
Harmonize on name and meaning of IGNORE_URLS-ish config option #144
Comments
I agree on adding I guess if it ends in Wildcard matchers are probably a better idea than regexes IMO. I suppose even only supporting |
Strictly speaking, I think we're matching paths and not URLs? |
@mikker regarding wildcards, I think we should all try and match the behavior of Regarding URL, yes, my proposal is to match against the "raw" path, thanks for the clarification. I'll update the description. |
IMO, the |
@jahtalab can you go into a bit more details of why you think it isn't a good fit? You talked a bit about it in our agents meeting, but for posterity's sake, and possibly as a base for further discussion, it would be nice if you wrote it up. Personally, I think the most important thing we need to make sure is harmonized amongst agents is user expectations. If I add |
Conceptually I tend to separate the configuration used for incoming request in the backend and the url of a page visited in the browser. Having two different meaning for the same configuration option tends to create problems down the line. For example, in the backend agent the request URL is used by default as the transaction name but this is not the case for the RUM agent and we let the user to set the name of the page load transaction. Furthermore, the RUM agent has |
Updated the "What we are voting on" piece of the issue, with the decisions made in today's agents meeting. I made an executive decision that it should be case insensitive by default. If you disagree please comment here. :) |
As "glob matching" or wildcard matching can mean lots of things, let's define that as well. My take on it:
These constraints make it reasonable to both implement a matcher from scratch, like in https://github.com/elastic/apm-agent-java/blob/master/apm-agent-core/src/main/java/co/elastic/apm/agent/matcher/WildcardMatcher.java and to build a wildcard matcher based on regex. The latter would work by regex-quoting the input string and then replacing |
@felixbarny How worried are we about "accidentally" allowing for things like single character wildcards? Python has |
If there are quirks, people will inevitably come to rely on them (insert XKCD spacebar comic here). We could just say that they shouldn't do that, but I think it would be preferable to be consistent and exact. I think you could still use |
FWIW, we already do have an implementation of wildcard matching in the Python agent |
I copied Python's approach for the Ruby agent, basically pulling all the (Very smart, @beniwohli!) (Update: I see you described the approach already, Felix. Still smart 😉) |
@elastic/apm-agent-devs please leave your vote in the issue description 🙂 |
Should we only match against the path, or also the query string? Pro include query string: easy to add something like I'm tending towards not including the query string |
++ |
As it seems there is an agreement on this with the new config name and behavior described in the description. (Except RUM, it's different...). Some agents already linked implementation issues, I suggest the rest also creates and links those and we close this and start implementing it soon. Reason I bring this up is that people are asking for this in .NET and I waited to see what we agree on here (I expect PHP will have the same situation). I will implement it for .NET according to the description above, but as it seems .NET will be the only one doing it this way and I see a little bit of a risk that we'll end up now with N+1 way of doing this. So in sum: if you agree please add implementation issue for your corresponding agent and schedule it; and let's close this one since we agree on the new name and behavior which is in the issue description. |
We discussed this is today's agent meeting.
|
When implementing this change, agents should test against this common set of test cases to ensure interoperability: #313 |
Description of the issue
Most (all?) agents have a config option
ignore_urls
(or similar, see below) to ignore certain transactions by URL, using pattern matching. Unfortunately, there are subtle and not-so-subtle differences across agents:ignore_url_patterns
transaction_ignore_patterns
. Oh, and it's matched against the transaction name, not the URL (historically, this is so it can also be used for non-HTTP transactions, like background jobs)These differences in both naming and semantics make it difficult to use this config option in a remote config scenario. Therefore, we should harmonize.
Semantics is probably the easier of the two: I propose that we follow the lead of the Java and Go agent, and use wildcard matching on the
path
part of the URL itself (not the parametrized URL pattern).As for naming, using
IGNORE_URLS
orIGNORE_URL_PATTERNS
poses the difficulty that they are already used with different semantics by some agents (the former by Node, the latter by Ruby). Therefore, I propose to useTRANSACTION_IGNORE_URLS
, assuming that all agents only apply this config option to transactions, not errors or metrics (if that's not the case in your current implementation, please speak up!).What we are voting on
All agents will add a new config option,
TRANSACTION_IGNORE_URLS
, which will use glob matching. It will be case insensitive by default. There is no required deprecation path for old config values, each agent team can decide that for themselves.Vote
The text was updated successfully, but these errors were encountered: