Skip to content

Commit c65609b

Browse files
authored
ref(metrics): add metric options for PHP (#15715)
Add metrics options for PHP ## DESCRIBE YOUR PR *Tell us what you're changing and why. If your PR **resolves an issue**, please link it so it closes automatically.* ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [ ] Other deadline: <!-- ENTER DATE HERE --> - [ ] None: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) ## LEGAL BOILERPLATE <!-- Sentry employees and contractors can delete or ignore this section. --> Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms. ## EXTRA RESOURCES - [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)
1 parent 6826f57 commit c65609b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docs/platforms/php/common/configuration/options.mdx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,20 @@ This function is called with a log object, and can return a modified log event o
241241

242242
</SdkOption>
243243

244+
## Metrics Options
245+
246+
<SdkOption name="enable_metrics" type='bool' defaultValue='true'>
247+
248+
This option enables the metrics feature, which allows the SDK to send metrics. This is enabled by default.
249+
250+
</SdkOption>
251+
252+
<SdkOption name="before_send_metric" type='function (\Sentry\Metrics\Types\Metric $metric): ?\Sentry\Metrics\Types\Metric'>
253+
254+
This function is called with a metric object, and can return a modified metric object, or `null` to skip the metric.
255+
256+
</SdkOption>
257+
244258
## Transport Options
245259

246260
Transports are used to send events to Sentry. Transports can be customized to some degree to better support highly specific deployments.

0 commit comments

Comments
 (0)