-
Notifications
You must be signed in to change notification settings - Fork 525
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
Introduce model.Processor #5984
Conversation
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪 |
Processor identifies the event kind: transaction, span, metricset, error, or profile. This is used for routing events to the appropriate index or data stream, and in queries for fetching events of a given kind.
Also, remove unused metrics.
b09a075
to
9a20129
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Big fan of the move to explicitly setting the datastream based on Processor
. One question where it looks like processor might be getting double set, but that's all.
model/modeldecoder/rumv3/decoder.go
Outdated
*batch = append(*batch, metricset) | ||
event := input.Base | ||
mapToMetricsetModel(&m, &event) | ||
event.Processor = model.MetricsetProcessor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It appears this event.Processor = model.MetricsetProcessor
is also being set in mapToMetricsetModel
? Is that intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch, I've removed these ones and consolidated on setting it in mapToFooModel
switch { | ||
case event.Transaction != nil || event.Span != nil: | ||
switch event.Processor { | ||
case model.SpanProcessor, model.TransactionProcessor: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥳
This pull request is now in conflicts. Could you fix it @axw? 🙏
|
* Introduce model.Processor Processor identifies the event kind: transaction, span, metricset, error, or profile. This is used for routing events to the appropriate index or data stream, and in queries for fetching events of a given kind. * Update SetDataStream to use APMEvent.Processor * Move monitoring event counters to model processor Also, remove unused metrics. * Update aggregators to use Processor * sampling: use Processor * Update changelog * Remove redundant setting of event.Processor Co-authored-by: stuart nelson <[email protected]> (cherry picked from commit cb6b2da) # Conflicts: # changelogs/head.asciidoc # model/apmevent.go # model/apmevent_test.go # model/modeldecoder/rumv3/decoder.go # model/span.go # model/transaction.go # processor/otel/exceptions_test.go # x-pack/apm-server/sampling/groups_test.go # x-pack/apm-server/sampling/processor.go # x-pack/apm-server/sampling/processor_test.go
* Introduce model.Processor Processor identifies the event kind: transaction, span, metricset, error, or profile. This is used for routing events to the appropriate index or data stream, and in queries for fetching events of a given kind. * Update SetDataStream to use APMEvent.Processor * Move monitoring event counters to model processor Also, remove unused metrics. * Update aggregators to use Processor * sampling: use Processor * Update changelog * Remove redundant setting of event.Processor Co-authored-by: stuart nelson <[email protected]> # Conflicts: # changelogs/head.asciidoc
* Introduce model.Processor Processor identifies the event kind: transaction, span, metricset, error, or profile. This is used for routing events to the appropriate index or data stream, and in queries for fetching events of a given kind. * Update SetDataStream to use APMEvent.Processor * Move monitoring event counters to model processor Also, remove unused metrics. * Update aggregators to use Processor * sampling: use Processor * Update changelog * Remove redundant setting of event.Processor Co-authored-by: stuart nelson <[email protected]> # Conflicts: # changelogs/head.asciidoc
Verified this running
|
Motivation/summary
Introduce type
model.Processor
and fieldmodel.APMEvent.Processor
, which controls theprocessor.name
andprocessor.event
fields. These fields are used for identifying the event type, used for routing to the appropriate index/data stream and also for monitoring purposes.Processed event metrics have been moved to a dedicated
model.BatchProcessor
, and out of the model package; they use the Processor field to form the metric name.Note: Several unused metrics have been removed: stack trace and stack frame counts.
Checklist
- [ ] Documentation has been updatedHow to test these changes
Enable monitoring, ingest some events, check that
apm-server.processor.<event-type>.transformations
metrics are recorded.Related issues
#4410
#4120
#4715