184 строки
18 KiB
YAML
184 строки
18 KiB
YAML
### YamlMime:JavaType
|
|
uid: "com.azure.cosmos.models.CosmosClientTelemetryConfig"
|
|
fullName: "com.azure.cosmos.models.CosmosClientTelemetryConfig"
|
|
name: "CosmosClientTelemetryConfig"
|
|
nameWithType: "CosmosClientTelemetryConfig"
|
|
summary: "Class with config options for Cosmos Client telemetry"
|
|
inheritances:
|
|
- "<xref href=\"java.lang.Object?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
|
|
inheritedClassMethods:
|
|
- classRef: "java.lang.<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
|
|
methodsRef:
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--\">clone</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-\">equals</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--\">finalize</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--\">getClass</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--\">hashCode</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--\">notify</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--\">notifyAll</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--\">toString</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--\">wait</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-\">wait</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-\">wait</a>"
|
|
syntax: "public final class **CosmosClientTelemetryConfig**"
|
|
constructors:
|
|
- uid: "com.azure.cosmos.models.CosmosClientTelemetryConfig.CosmosClientTelemetryConfig()"
|
|
fullName: "com.azure.cosmos.models.CosmosClientTelemetryConfig.CosmosClientTelemetryConfig()"
|
|
name: "CosmosClientTelemetryConfig()"
|
|
nameWithType: "CosmosClientTelemetryConfig.CosmosClientTelemetryConfig()"
|
|
summary: "Instantiates a new Cosmos client telemetry configuration."
|
|
syntax: "public CosmosClientTelemetryConfig()"
|
|
desc: "Instantiates a new Cosmos client telemetry configuration."
|
|
methods:
|
|
- uid: "com.azure.cosmos.models.CosmosClientTelemetryConfig.clientCorrelationId(java.lang.String)"
|
|
fullName: "com.azure.cosmos.models.CosmosClientTelemetryConfig.clientCorrelationId(String clientCorrelationId)"
|
|
name: "clientCorrelationId(String clientCorrelationId)"
|
|
nameWithType: "CosmosClientTelemetryConfig.clientCorrelationId(String clientCorrelationId)"
|
|
summary: "Sets the client correlation<wbr>Id used for tags in metrics."
|
|
parameters:
|
|
- description: "the client correlationId to be used to identify this client instance in metrics"
|
|
name: "clientCorrelationId"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
syntax: "public CosmosClientTelemetryConfig clientCorrelationId(String clientCorrelationId)"
|
|
desc: "Sets the client correlationId used for tags in metrics. While we strongly encourage usage of singleton instances of CosmosClient there are cases when it is necessary to instantiate multiple CosmosClient instances - for example when an application connects to multiple Cosmos accounts. The client correlationId is used to distinguish client instances in metrics. By default an auto-incrementing number is used but with this method you can define your own correlationId (for example an identifier for the account)"
|
|
returns:
|
|
description: "current CosmosClientTelemetryConfig"
|
|
type: "<xref href=\"com.azure.cosmos.models.CosmosClientTelemetryConfig?alt=com.azure.cosmos.models.CosmosClientTelemetryConfig&text=CosmosClientTelemetryConfig\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.cosmos.models.CosmosClientTelemetryConfig.diagnosticsHandler(com.azure.cosmos.CosmosDiagnosticsHandler)"
|
|
fullName: "com.azure.cosmos.models.CosmosClientTelemetryConfig.diagnosticsHandler(CosmosDiagnosticsHandler handler)"
|
|
name: "diagnosticsHandler(CosmosDiagnosticsHandler handler)"
|
|
nameWithType: "CosmosClientTelemetryConfig.diagnosticsHandler(CosmosDiagnosticsHandler handler)"
|
|
summary: "Injects a custom diagnostics handler"
|
|
parameters:
|
|
- description: "the custom diagnostics handler."
|
|
name: "handler"
|
|
type: "<xref href=\"com.azure.cosmos.CosmosDiagnosticsHandler?alt=com.azure.cosmos.CosmosDiagnosticsHandler&text=CosmosDiagnosticsHandler\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public CosmosClientTelemetryConfig diagnosticsHandler(CosmosDiagnosticsHandler handler)"
|
|
desc: "Injects a custom diagnostics handler"
|
|
returns:
|
|
description: "current CosmosClientTelemetryConfig"
|
|
type: "<xref href=\"com.azure.cosmos.models.CosmosClientTelemetryConfig?alt=com.azure.cosmos.models.CosmosClientTelemetryConfig&text=CosmosClientTelemetryConfig\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.cosmos.models.CosmosClientTelemetryConfig.diagnosticsThresholds(com.azure.cosmos.CosmosDiagnosticsThresholds)"
|
|
fullName: "com.azure.cosmos.models.CosmosClientTelemetryConfig.diagnosticsThresholds(CosmosDiagnosticsThresholds thresholds)"
|
|
name: "diagnosticsThresholds(CosmosDiagnosticsThresholds thresholds)"
|
|
nameWithType: "CosmosClientTelemetryConfig.diagnosticsThresholds(CosmosDiagnosticsThresholds thresholds)"
|
|
summary: "Request diagnostics for operations will be logged if their latency, request charge or payload size exceeds one of the defined thresholds."
|
|
parameters:
|
|
- description: "the default thresholds across all diagnostic types"
|
|
name: "thresholds"
|
|
type: "<xref href=\"com.azure.cosmos.CosmosDiagnosticsThresholds?alt=com.azure.cosmos.CosmosDiagnosticsThresholds&text=CosmosDiagnosticsThresholds\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public CosmosClientTelemetryConfig diagnosticsThresholds(CosmosDiagnosticsThresholds thresholds)"
|
|
desc: "Request diagnostics for operations will be logged if their latency, request charge or payload size exceeds one of the defined thresholds. This method can be used to customize the default thresholds, which are used across different types of diagnostics (logging, tracing, client telemetry)."
|
|
returns:
|
|
description: "current CosmosClientTelemetryConfig"
|
|
type: "<xref href=\"com.azure.cosmos.models.CosmosClientTelemetryConfig?alt=com.azure.cosmos.models.CosmosClientTelemetryConfig&text=CosmosClientTelemetryConfig\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.cosmos.models.CosmosClientTelemetryConfig.enableTransportLevelTracing()"
|
|
fullName: "com.azure.cosmos.models.CosmosClientTelemetryConfig.enableTransportLevelTracing()"
|
|
name: "enableTransportLevelTracing()"
|
|
nameWithType: "CosmosClientTelemetryConfig.enableTransportLevelTracing()"
|
|
summary: "Enables transport level tracing."
|
|
syntax: "public CosmosClientTelemetryConfig enableTransportLevelTracing()"
|
|
desc: "Enables transport level tracing. By default, transport-level tracing is not enabled - but when operations fail or exceed thresholds the diagnostics are traced. Enabling transport level tracing can be useful when latency is still beneath the defined thresholds."
|
|
returns:
|
|
description: "current CosmosClientTelemetryConfig"
|
|
type: "<xref href=\"com.azure.cosmos.models.CosmosClientTelemetryConfig?alt=com.azure.cosmos.models.CosmosClientTelemetryConfig&text=CosmosClientTelemetryConfig\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.cosmos.models.CosmosClientTelemetryConfig.metricTagNames(java.lang.String...)"
|
|
fullName: "com.azure.cosmos.models.CosmosClientTelemetryConfig.metricTagNames(String[] tagNames)"
|
|
name: "metricTagNames(String[] tagNames)"
|
|
nameWithType: "CosmosClientTelemetryConfig.metricTagNames(String[] tagNames)"
|
|
summary: "Sets the tags that should be considered for metrics."
|
|
deprecatedTag: "Use <xref uid=\"com.azure.cosmos.models.CosmosMicrometerMetricsOptions.configureDefaultTagNames*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosMicrometerMetricsOptions#configureDefaultTagNames(CosmosMetricTagName...)\"></xref> or <xref uid=\"com.azure.cosmos.models.CosmosMicrometerMeterOptions.suppressTagNames*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosMicrometerMeterOptions#suppressTagNames(CosmosMetricTagName...)\"></xref> instead."
|
|
parameters:
|
|
- description: "- a comma-separated list of tag names that should be considered"
|
|
name: "tagNames"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>[]"
|
|
syntax: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html\">@Deprecated</a></br>public CosmosClientTelemetryConfig metricTagNames(String[] tagNames)"
|
|
desc: "Sets the tags that should be considered for metrics. By default all supported tags are used - and for most use-cases that should be sufficient. But each tag/dimension adds some overhead when collecting the metrics - especially for percentile calculations - so, when it is clear that a certain dimension is not needed, it can be prevented from even considering it when collecting metrics."
|
|
hasDeprecatedTag: true
|
|
returns:
|
|
description: "current CosmosClientTelemetryConfig"
|
|
type: "<xref href=\"com.azure.cosmos.models.CosmosClientTelemetryConfig?alt=com.azure.cosmos.models.CosmosClientTelemetryConfig&text=CosmosClientTelemetryConfig\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.cosmos.models.CosmosClientTelemetryConfig.metricsOptions(com.azure.core.util.MetricsOptions)"
|
|
fullName: "com.azure.cosmos.models.CosmosClientTelemetryConfig.metricsOptions(MetricsOptions clientMetricsOptions)"
|
|
name: "metricsOptions(MetricsOptions clientMetricsOptions)"
|
|
nameWithType: "CosmosClientTelemetryConfig.metricsOptions(MetricsOptions clientMetricsOptions)"
|
|
summary: "Sets Metrics<wbr>Options to be used to emit client metrics"
|
|
parameters:
|
|
- description: "- the client MetricsOptions - NOTE: for now only\n CosmosMicrometerMetricsOptions are supported"
|
|
name: "clientMetricsOptions"
|
|
type: "<xref href=\"com.azure.core.util.MetricsOptions?alt=com.azure.core.util.MetricsOptions&text=MetricsOptions\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public CosmosClientTelemetryConfig metricsOptions(MetricsOptions clientMetricsOptions)"
|
|
desc: "Sets MetricsOptions to be used to emit client metrics"
|
|
returns:
|
|
description: "current CosmosClientTelemetryConfig"
|
|
type: "<xref href=\"com.azure.cosmos.models.CosmosClientTelemetryConfig?alt=com.azure.cosmos.models.CosmosClientTelemetryConfig&text=CosmosClientTelemetryConfig\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.cosmos.models.CosmosClientTelemetryConfig.sampleDiagnostics(double)"
|
|
fullName: "com.azure.cosmos.models.CosmosClientTelemetryConfig.sampleDiagnostics(double samplingRate)"
|
|
name: "sampleDiagnostics(double samplingRate)"
|
|
nameWithType: "CosmosClientTelemetryConfig.sampleDiagnostics(double samplingRate)"
|
|
summary: "Can be used to enable sampling for capturing all diagnostics to reduce/disable any client resource overhead (CPU and/or memory)."
|
|
parameters:
|
|
- description: "the sampling rate - 0 means no diagnostics will be capture at all, 1 means no sampling\n applies and all diagnostics are captured."
|
|
name: "samplingRate"
|
|
type: "<xref href=\"double?alt=double&text=double\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public CosmosClientTelemetryConfig sampleDiagnostics(double samplingRate)"
|
|
desc: "Can be used to enable sampling for capturing all diagnostics to reduce/disable any client resource overhead (CPU and/or memory). The sampling rate can for example be reduced when an application has high CPU usage to reduce overhead for capturing diagnostics temporarily. The sampling is applied to operations in the SDK - so, a single operation is either sampled out completely or all diagnostics (logs, tracing, metrics depending on what diagnostics are enabled) are captured. The main motivation for applying sampling for an entire operation is that a significant part of the CPU overhead happens when injecting the Context into the reactor pipeline - and the CPU usage reduction would be lower when sampling out metrics on one operation (but still capture traces) and traces on another operation (but still capturing metrics). In this case both operations would still have significant overhead - so, it is more efficient to cover both metrics and traces for one operation and disable diagnostics completely for the second operation. It also makes it easier to correlate metrics and traces for example when sampling is applied on the operation-level as described above."
|
|
returns:
|
|
description: "current CosmosClientTelemetryConfig"
|
|
type: "<xref href=\"com.azure.cosmos.models.CosmosClientTelemetryConfig?alt=com.azure.cosmos.models.CosmosClientTelemetryConfig&text=CosmosClientTelemetryConfig\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.cosmos.models.CosmosClientTelemetryConfig.sendClientTelemetryToService(boolean)"
|
|
fullName: "com.azure.cosmos.models.CosmosClientTelemetryConfig.sendClientTelemetryToService(boolean enabled)"
|
|
name: "sendClientTelemetryToService(boolean enabled)"
|
|
nameWithType: "CosmosClientTelemetryConfig.sendClientTelemetryToService(boolean enabled)"
|
|
summary: "Enables or disables sending Cosmos DB client telemetry to the Azure Cosmos DB Service"
|
|
parameters:
|
|
- description: "a flag indicating whether sending client telemetry to the backend should be\n enabled or not"
|
|
name: "enabled"
|
|
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public CosmosClientTelemetryConfig sendClientTelemetryToService(boolean enabled)"
|
|
desc: "Enables or disables sending Cosmos DB client telemetry to the Azure Cosmos DB Service"
|
|
returns:
|
|
description: "current CosmosClientTelemetryConfig"
|
|
type: "<xref href=\"com.azure.cosmos.models.CosmosClientTelemetryConfig?alt=com.azure.cosmos.models.CosmosClientTelemetryConfig&text=CosmosClientTelemetryConfig\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.cosmos.models.CosmosClientTelemetryConfig.showQueryMode(com.azure.cosmos.models.ShowQueryMode)"
|
|
fullName: "com.azure.cosmos.models.CosmosClientTelemetryConfig.showQueryMode(ShowQueryMode showQueryMode)"
|
|
name: "showQueryMode(ShowQueryMode showQueryMode)"
|
|
nameWithType: "CosmosClientTelemetryConfig.showQueryMode(ShowQueryMode showQueryMode)"
|
|
summary: "Enables printing query in db.<wbr>statement attribute and diagnostic logs."
|
|
parameters:
|
|
- description: "the mode for printing none, parameterized or all of the query statements"
|
|
name: "showQueryMode"
|
|
type: "<xref href=\"com.azure.cosmos.models.ShowQueryMode?alt=com.azure.cosmos.models.ShowQueryMode&text=ShowQueryMode\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public CosmosClientTelemetryConfig showQueryMode(ShowQueryMode showQueryMode)"
|
|
desc: "Enables printing query in db.statement attribute and diagnostic logs. By default, query is not printed. Users have the option to enable printing parameterized or all queries, but has to beware that customer data may be shown when the later option is chosen It's the user's responsibility to sanitize the queries if necessary."
|
|
returns:
|
|
description: "current CosmosClientTelemetryConfig"
|
|
type: "<xref href=\"com.azure.cosmos.models.CosmosClientTelemetryConfig?alt=com.azure.cosmos.models.CosmosClientTelemetryConfig&text=CosmosClientTelemetryConfig\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.cosmos.models.CosmosClientTelemetryConfig.toString()"
|
|
fullName: "com.azure.cosmos.models.CosmosClientTelemetryConfig.toString()"
|
|
name: "toString()"
|
|
nameWithType: "CosmosClientTelemetryConfig.toString()"
|
|
overridden: "java.lang.Object.toString()"
|
|
syntax: "public String toString()"
|
|
returns:
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
- uid: "com.azure.cosmos.models.CosmosClientTelemetryConfig.tracingOptions(com.azure.core.util.TracingOptions)"
|
|
fullName: "com.azure.cosmos.models.CosmosClientTelemetryConfig.tracingOptions(TracingOptions tracingOptions)"
|
|
name: "tracingOptions(TracingOptions tracingOptions)"
|
|
nameWithType: "CosmosClientTelemetryConfig.tracingOptions(TracingOptions tracingOptions)"
|
|
summary: "Sets <xref uid=\"com.azure.core.util.TracingOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TracingOptions\"></xref> that are applied to each tracing reported by the client."
|
|
parameters:
|
|
- description: "instance of <xref uid=\"com.azure.core.util.TracingOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TracingOptions\"></xref> to set."
|
|
name: "tracingOptions"
|
|
type: "<xref href=\"com.azure.core.util.TracingOptions?alt=com.azure.core.util.TracingOptions&text=TracingOptions\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public CosmosClientTelemetryConfig tracingOptions(TracingOptions tracingOptions)"
|
|
desc: "Sets <xref uid=\"com.azure.core.util.TracingOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"TracingOptions\"></xref> that are applied to each tracing reported by the client. Use tracing options to enable and disable tracing or pass implementation-specific configuration."
|
|
returns:
|
|
description: "The updated <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ClientOptions\"></xref> object."
|
|
type: "<xref href=\"com.azure.cosmos.models.CosmosClientTelemetryConfig?alt=com.azure.cosmos.models.CosmosClientTelemetryConfig&text=CosmosClientTelemetryConfig\" data-throw-if-not-resolved=\"False\" />"
|
|
type: "class"
|
|
desc: "Class with config options for Cosmos Client telemetry"
|
|
metadata: {}
|
|
package: "com.azure.cosmos.models"
|
|
artifact: com.azure:azure-cosmos:4.63.4
|