-
-
Save brunohenrique/19a9f584236dc40d88a3fdcdb93d383c to your computer and use it in GitHub Desktop.
starter-refinery-rules
This file contains hidden or 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
RulesVersion: 2 | |
Samplers: | |
__default__: | |
RulesBasedSampler: | |
Rules: | |
- Name: Keep 500 status codes | |
SampleRate: 1 | |
Conditions: | |
- Fields: | |
- http.status_code | |
- http.response.status_code | |
Operator: '>=' | |
Value: 500 | |
Datatype: int | |
- Name: Keep Type 2 GRPC Status Codes | |
SampleRate: 1 | |
Conditions: | |
- Field: status_code | |
Operator: ">=" | |
Value: 2 | |
Datatype: int | |
- Name: Keep where error field exists | |
SampleRate: 1 | |
Conditions: | |
- Field: error | |
Operator: exists | |
- Name: drop healthchecks | |
Drop: true | |
Scope: span | |
Conditions: | |
- Field: root.http.route | |
Operator: starts-with | |
Value: /healthz | |
- Fields: | |
- http.status_code | |
- http.response.status_code | |
Operator: "=" | |
Value: 200 | |
Datatype: int | |
- Name: Keep long duration traces | |
SampleRate: 1 | |
Scope: span | |
Conditions: | |
- Field: trace.parent_id | |
Operator: not-exists | |
- Field: duration_ms | |
Operator: ">=" | |
Value: 5000 | |
Datatype: int | |
- Name: Dynamically Sample 200s through 400s | |
Conditions: | |
- Fields: | |
- http.status_code | |
- http.response.status_code | |
Operator: ">=" | |
Value: 200 | |
Datatype: int | |
Sampler: | |
EMADynamicSampler: | |
GoalSampleRate: 10 # This is a sample rate itself | |
FieldList: | |
- service.name | |
- http.route | |
- http.method | |
- Name: Dynamically Sample Non-HTTP Request | |
Conditions: | |
- Field: status_code | |
Operator: "<" | |
Value: 2 | |
Datatype: int | |
Sampler: | |
EMADynamicSampler: | |
GoalSampleRate: 10 # This is a sample rate itself | |
FieldList: | |
- service.name | |
- grpc.method | |
- grpc.service | |
- Name: Catchall rule | |
Sampler: | |
EMAThroughputSampler: | |
GoalThroughputPerSec: 500 # This is spans per second for the entire cluster | |
UseClusterSize: true # Ensures GoalThroughputPerSec is for the full refinery cluster and not per node | |
FieldList: | |
- service.name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment