Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ public ViewBuilder setAggregation(Aggregation aggregation) {
/**
* Sets a filter which retains attribute keys included in {@code keysToRetain}.
*
* <p>Note: Attributes dropped by this filter may still appear on recorded exemplars. If you need
* to remove sensitive data from exemplars, you must disable exemplars entirely (e.g., using
* {@link SdkMeterProviderBuilder#setExemplarFilter(ExemplarFilter)} with {@link
* ExemplarFilter#alwaysOff()}), filter them using a delegating exporter, or filter them in the
* OpenTelemetry Collector.
*
* @since 1.30.0
*/
public ViewBuilder setAttributeFilter(Set<String> keysToRetain) {
Expand All @@ -89,6 +95,12 @@ public ViewBuilder setAttributeFilter(Set<String> keysToRetain) {
*
* <p>Only attribute keys that pass the supplied {@link Predicate} will be included in the output.
*
* <p>Note: Attributes dropped by this filter may still appear on recorded exemplars. If you need
* to remove sensitive data from exemplars, you must disable exemplars entirely (e.g., using
* {@link SdkMeterProviderBuilder#setExemplarFilter(ExemplarFilter)} with {@link
* ExemplarFilter#alwaysOff()}), filter them using a delegating exporter, or filter them in the
* OpenTelemetry Collector.
*
* @param keyFilter filter for attribute keys to include.
*/
public ViewBuilder setAttributeFilter(Predicate<String> keyFilter) {
Expand Down
Loading