Skip to content

Commit

Permalink
Fixing documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
boostchicken committed Jun 11, 2022
1 parent 660bc0e commit fe9ba1c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
13 changes: 1 addition & 12 deletions internal/coreinternal/processor/filterspan/filterspan.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,7 @@ func (mp *propertiesMatcher) MatchSpan(span ptrace.Span, resource pcommon.Resour
if mp.serviceFilters != nil {
// Check resource and spans for service.name
serviceName := serviceNameForResource(resource)
if serviceName == "<nil-service-name>" {
serviceName = serviceNameForSpan(span)
}

if !mp.serviceFilters.Matches(serviceName) {
return false
}
Expand All @@ -137,12 +135,3 @@ func serviceNameForResource(resource pcommon.Resource) string {
}
return service.AsString()
}

// serviceNameForSpan gets the service name for a span
func serviceNameForSpan(span ptrace.Span) string {
service, found := span.Attributes().Get(conventions.AttributeServiceName)
if !found {
return "<nil-service-name>"
}
return service.AsString()
}
9 changes: 4 additions & 5 deletions processor/filterprocessor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,10 @@ processors:
In case the no metric names are provided, `matric_names` being empty, the filtering is only done at resource level.

### Filter Spans from Traces
```diff
- This pipeline is able to drop spans and whole traces, that means your traces will be incomplete in your visualizaiton tool. Why would wont want this you may ask?
Auto instrument 600 java-redis-clients and tell me how quickly your tracing platform goes to tis knees.
Also, DO NOT TRLY ON THIS PLUGIN FOR PCI/Sox/HIPPA etc. If the data has already gotten this far in the pipeline you have a larger root problem.
```

* This pipeline is able to drop spans and whole traces
* Note: If this drops a parent span, it does not search out it's children leading to a missing Span in your trace vizualization

See the documentation in the [attribute processor](../attributesprocessor/README.md) for syntax

For spans, one of Services, SpanNames, Attributes, Resources or Libraries must be specified with a
Expand Down

0 comments on commit fe9ba1c

Please sign in to comment.