-
Notifications
You must be signed in to change notification settings - Fork 224
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
feat: transaction_ignore_urls wildcard matching #1870
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
astorm
changed the title
feat: transaction_ignore_url wildcard matching
feat: transaction_ignore_urls wildcard matching
Nov 12, 2020
astorm
force-pushed
the
astorm/transaction-ignore-url-wildcard
branch
from
November 13, 2020 05:24
f248eff
to
1f14816
Compare
This prefers package.json#files (explicitly listing files to include) over .npmignore (trying to list all files to not include) for controlling files that are included in npm publish. The latter can cause a surprise if .gitignore is updated and .npmignore accidentally isn't.
In elastic/apm-server#4393 apm-server updated to new and generate JSON schema. This commit updates the tests to get the schema files from the new location and switches from the "is-my-json-valid" JSON Schema validator to the more capable "ajv" validator. This also changes the schema file cache dir so developers need not manually delete the old cache. Fixes #1867
Co-authored-by: apmmachine <infra-root-apmmachine@elastic.co> Co-authored-by: Alan Storm <astorm@users.noreply.github.com>
❕ Build Aborted
Expand to view the summary
Build stats
Log outputExpand to view the last 100 lines of log output
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Will Fix: #1689
Implements
ELASTIC_TRANSACTION_IGNORE_URL
/transactionIgnoreUrls
configuration for wildcard URL ignoring. The intent of this new configuration is to gives users the ability to skip generating transactions for a request to a URL that matches an exact string, or a URL that matches simple wildcard pattern. This wildcard pattern will behave consistently across language agents.This PR leaves the existing
ignoreUrls
configuration in place to allow users access to more powerful regular expression matching and to preserve existing functionality for users using this older configuration setting.This PR also introduces a new dependency,
escape-string-regexp
. In order to implement the suggested wildcard matching algorithm we needed the ability to escape a string for use in a regular expression. Since Node.js doesn't have this functionality natively, I pulled inescape-string-regexp
rather than attempt to write (easy) and maintain (harder) this functionality ourselves. Happy to revisit this decision if we'd rather implement this functionality ourselves.Open items for consideration/completion
escape-string-regexp
an acceptable dependency for ignore regular expressions?/
be assumed? (we'll prepend this, meaning a configured value of 'foo*' and '/foo*' will match the same)(?-i)
and(?+i)
prefixes across agentsisRequestBlacklisted
is only called ininstrumentRequest
, andinstrumentRequest
is only used when wrapping http(s).Server'semit
method (i.e. it's used in transaction starting)Checklist