Class EnhancedMetricsConfig
- java.lang.Object
-
- software.amazon.awssdk.services.appsync.model.EnhancedMetricsConfig
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<EnhancedMetricsConfig.Builder,EnhancedMetricsConfig>
@Generated("software.amazon.awssdk:codegen") public final class EnhancedMetricsConfig extends Object implements SdkPojo, Serializable, ToCopyableBuilder<EnhancedMetricsConfig.Builder,EnhancedMetricsConfig>
Enables and controls the enhanced metrics feature. Enhanced metrics emit granular data on API usage and performance such as AppSync request and error counts, latency, and cache hits/misses. All enhanced metric data is sent to your CloudWatch account, and you can configure the types of data that will be sent.
Enhanced metrics can be configured at the resolver, data source, and operation levels.
EnhancedMetricsConfigcontains three required parameters, each controlling one of these categories:-
resolverLevelMetricsBehavior: Controls how resolver metrics will be emitted to CloudWatch. Resolver metrics include:-
GraphQL errors: The number of GraphQL errors that occurred.
-
Requests: The number of invocations that occurred during a request.
-
Latency: The time to complete a resolver invocation.
-
Cache hits: The number of cache hits during a request.
-
Cache misses: The number of cache misses during a request.
These metrics can be emitted to CloudWatch per resolver or for all resolvers in the request. Metrics will be recorded by API ID and resolver name.
resolverLevelMetricsBehavioraccepts one of these values at a time:-
FULL_REQUEST_RESOLVER_METRICS: Records and emits metric data for all resolvers in the request. -
PER_RESOLVER_METRICS: Records and emits metric data for resolvers that have themetricConfigvalue set toENABLED.
-
-
dataSourceLevelMetricsBehavior: Controls how data source metrics will be emitted to CloudWatch. Data source metrics include:-
Requests: The number of invocations that occured during a request.
-
Latency: The time to complete a data source invocation.
-
Errors: The number of errors that occurred during a data source invocation.
These metrics can be emitted to CloudWatch per data source or for all data sources in the request. Metrics will be recorded by API ID and data source name.
dataSourceLevelMetricsBehavioraccepts one of these values at a time:-
FULL_REQUEST_DATA_SOURCE_METRICS: Records and emits metric data for all data sources in the request. -
PER_DATA_SOURCE_METRICS: Records and emits metric data for data sources that have themetricConfigvalue set toENABLED.
-
-
operationLevelMetricsConfig: Controls how operation metrics will be emitted to CloudWatch. Operation metrics include:-
Requests: The number of times a specified GraphQL operation was called.
-
GraphQL errors: The number of GraphQL errors that occurred during a specified GraphQL operation.
Metrics will be recorded by API ID and operation name. You can set the value to
ENABLEDorDISABLED. -
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceEnhancedMetricsConfig.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EnhancedMetricsConfig.Builderbuilder()DataSourceLevelMetricsBehaviordataSourceLevelMetricsBehavior()Controls how data source metrics will be emitted to CloudWatch.StringdataSourceLevelMetricsBehaviorAsString()Controls how data source metrics will be emitted to CloudWatch.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()OperationLevelMetricsConfigoperationLevelMetricsConfig()Controls how operation metrics will be emitted to CloudWatch.StringoperationLevelMetricsConfigAsString()Controls how operation metrics will be emitted to CloudWatch.ResolverLevelMetricsBehaviorresolverLevelMetricsBehavior()Controls how resolver metrics will be emitted to CloudWatch.StringresolverLevelMetricsBehaviorAsString()Controls how resolver metrics will be emitted to CloudWatch.List<SdkField<?>>sdkFields()static Class<? extends EnhancedMetricsConfig.Builder>serializableBuilderClass()EnhancedMetricsConfig.BuildertoBuilder()StringtoString()Returns a string representation of this object.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
resolverLevelMetricsBehavior
public final ResolverLevelMetricsBehavior resolverLevelMetricsBehavior()
Controls how resolver metrics will be emitted to CloudWatch. Resolver metrics include:
-
GraphQL errors: The number of GraphQL errors that occurred.
-
Requests: The number of invocations that occurred during a request.
-
Latency: The time to complete a resolver invocation.
-
Cache hits: The number of cache hits during a request.
-
Cache misses: The number of cache misses during a request.
These metrics can be emitted to CloudWatch per resolver or for all resolvers in the request. Metrics will be recorded by API ID and resolver name.
resolverLevelMetricsBehavioraccepts one of these values at a time:-
FULL_REQUEST_RESOLVER_METRICS: Records and emits metric data for all resolvers in the request. -
PER_RESOLVER_METRICS: Records and emits metric data for resolvers that have themetricConfigvalue set toENABLED.
If the service returns an enum value that is not available in the current SDK version,
resolverLevelMetricsBehaviorwill returnResolverLevelMetricsBehavior.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromresolverLevelMetricsBehaviorAsString().- Returns:
- Controls how resolver metrics will be emitted to CloudWatch. Resolver metrics include:
-
GraphQL errors: The number of GraphQL errors that occurred.
-
Requests: The number of invocations that occurred during a request.
-
Latency: The time to complete a resolver invocation.
-
Cache hits: The number of cache hits during a request.
-
Cache misses: The number of cache misses during a request.
These metrics can be emitted to CloudWatch per resolver or for all resolvers in the request. Metrics will be recorded by API ID and resolver name.
resolverLevelMetricsBehavioraccepts one of these values at a time:-
FULL_REQUEST_RESOLVER_METRICS: Records and emits metric data for all resolvers in the request. -
PER_RESOLVER_METRICS: Records and emits metric data for resolvers that have themetricConfigvalue set toENABLED.
-
- See Also:
ResolverLevelMetricsBehavior
-
-
resolverLevelMetricsBehaviorAsString
public final String resolverLevelMetricsBehaviorAsString()
Controls how resolver metrics will be emitted to CloudWatch. Resolver metrics include:
-
GraphQL errors: The number of GraphQL errors that occurred.
-
Requests: The number of invocations that occurred during a request.
-
Latency: The time to complete a resolver invocation.
-
Cache hits: The number of cache hits during a request.
-
Cache misses: The number of cache misses during a request.
These metrics can be emitted to CloudWatch per resolver or for all resolvers in the request. Metrics will be recorded by API ID and resolver name.
resolverLevelMetricsBehavioraccepts one of these values at a time:-
FULL_REQUEST_RESOLVER_METRICS: Records and emits metric data for all resolvers in the request. -
PER_RESOLVER_METRICS: Records and emits metric data for resolvers that have themetricConfigvalue set toENABLED.
If the service returns an enum value that is not available in the current SDK version,
resolverLevelMetricsBehaviorwill returnResolverLevelMetricsBehavior.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromresolverLevelMetricsBehaviorAsString().- Returns:
- Controls how resolver metrics will be emitted to CloudWatch. Resolver metrics include:
-
GraphQL errors: The number of GraphQL errors that occurred.
-
Requests: The number of invocations that occurred during a request.
-
Latency: The time to complete a resolver invocation.
-
Cache hits: The number of cache hits during a request.
-
Cache misses: The number of cache misses during a request.
These metrics can be emitted to CloudWatch per resolver or for all resolvers in the request. Metrics will be recorded by API ID and resolver name.
resolverLevelMetricsBehavioraccepts one of these values at a time:-
FULL_REQUEST_RESOLVER_METRICS: Records and emits metric data for all resolvers in the request. -
PER_RESOLVER_METRICS: Records and emits metric data for resolvers that have themetricConfigvalue set toENABLED.
-
- See Also:
ResolverLevelMetricsBehavior
-
-
dataSourceLevelMetricsBehavior
public final DataSourceLevelMetricsBehavior dataSourceLevelMetricsBehavior()
Controls how data source metrics will be emitted to CloudWatch. Data source metrics include:
-
Requests: The number of invocations that occured during a request.
-
Latency: The time to complete a data source invocation.
-
Errors: The number of errors that occurred during a data source invocation.
These metrics can be emitted to CloudWatch per data source or for all data sources in the request. Metrics will be recorded by API ID and data source name.
dataSourceLevelMetricsBehavioraccepts one of these values at a time:-
FULL_REQUEST_DATA_SOURCE_METRICS: Records and emits metric data for all data sources in the request. -
PER_DATA_SOURCE_METRICS: Records and emits metric data for data sources that have themetricConfigvalue set toENABLED.
If the service returns an enum value that is not available in the current SDK version,
dataSourceLevelMetricsBehaviorwill returnDataSourceLevelMetricsBehavior.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromdataSourceLevelMetricsBehaviorAsString().- Returns:
- Controls how data source metrics will be emitted to CloudWatch. Data source metrics include:
-
Requests: The number of invocations that occured during a request.
-
Latency: The time to complete a data source invocation.
-
Errors: The number of errors that occurred during a data source invocation.
These metrics can be emitted to CloudWatch per data source or for all data sources in the request. Metrics will be recorded by API ID and data source name.
dataSourceLevelMetricsBehavioraccepts one of these values at a time:-
FULL_REQUEST_DATA_SOURCE_METRICS: Records and emits metric data for all data sources in the request. -
PER_DATA_SOURCE_METRICS: Records and emits metric data for data sources that have themetricConfigvalue set toENABLED.
-
- See Also:
DataSourceLevelMetricsBehavior
-
-
dataSourceLevelMetricsBehaviorAsString
public final String dataSourceLevelMetricsBehaviorAsString()
Controls how data source metrics will be emitted to CloudWatch. Data source metrics include:
-
Requests: The number of invocations that occured during a request.
-
Latency: The time to complete a data source invocation.
-
Errors: The number of errors that occurred during a data source invocation.
These metrics can be emitted to CloudWatch per data source or for all data sources in the request. Metrics will be recorded by API ID and data source name.
dataSourceLevelMetricsBehavioraccepts one of these values at a time:-
FULL_REQUEST_DATA_SOURCE_METRICS: Records and emits metric data for all data sources in the request. -
PER_DATA_SOURCE_METRICS: Records and emits metric data for data sources that have themetricConfigvalue set toENABLED.
If the service returns an enum value that is not available in the current SDK version,
dataSourceLevelMetricsBehaviorwill returnDataSourceLevelMetricsBehavior.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromdataSourceLevelMetricsBehaviorAsString().- Returns:
- Controls how data source metrics will be emitted to CloudWatch. Data source metrics include:
-
Requests: The number of invocations that occured during a request.
-
Latency: The time to complete a data source invocation.
-
Errors: The number of errors that occurred during a data source invocation.
These metrics can be emitted to CloudWatch per data source or for all data sources in the request. Metrics will be recorded by API ID and data source name.
dataSourceLevelMetricsBehavioraccepts one of these values at a time:-
FULL_REQUEST_DATA_SOURCE_METRICS: Records and emits metric data for all data sources in the request. -
PER_DATA_SOURCE_METRICS: Records and emits metric data for data sources that have themetricConfigvalue set toENABLED.
-
- See Also:
DataSourceLevelMetricsBehavior
-
-
operationLevelMetricsConfig
public final OperationLevelMetricsConfig operationLevelMetricsConfig()
Controls how operation metrics will be emitted to CloudWatch. Operation metrics include:
-
Requests: The number of times a specified GraphQL operation was called.
-
GraphQL errors: The number of GraphQL errors that occurred during a specified GraphQL operation.
Metrics will be recorded by API ID and operation name. You can set the value to
ENABLEDorDISABLED.If the service returns an enum value that is not available in the current SDK version,
operationLevelMetricsConfigwill returnOperationLevelMetricsConfig.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromoperationLevelMetricsConfigAsString().- Returns:
- Controls how operation metrics will be emitted to CloudWatch. Operation metrics include:
-
Requests: The number of times a specified GraphQL operation was called.
-
GraphQL errors: The number of GraphQL errors that occurred during a specified GraphQL operation.
Metrics will be recorded by API ID and operation name. You can set the value to
ENABLEDorDISABLED. -
- See Also:
OperationLevelMetricsConfig
-
-
operationLevelMetricsConfigAsString
public final String operationLevelMetricsConfigAsString()
Controls how operation metrics will be emitted to CloudWatch. Operation metrics include:
-
Requests: The number of times a specified GraphQL operation was called.
-
GraphQL errors: The number of GraphQL errors that occurred during a specified GraphQL operation.
Metrics will be recorded by API ID and operation name. You can set the value to
ENABLEDorDISABLED.If the service returns an enum value that is not available in the current SDK version,
operationLevelMetricsConfigwill returnOperationLevelMetricsConfig.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromoperationLevelMetricsConfigAsString().- Returns:
- Controls how operation metrics will be emitted to CloudWatch. Operation metrics include:
-
Requests: The number of times a specified GraphQL operation was called.
-
GraphQL errors: The number of GraphQL errors that occurred during a specified GraphQL operation.
Metrics will be recorded by API ID and operation name. You can set the value to
ENABLEDorDISABLED. -
- See Also:
OperationLevelMetricsConfig
-
-
toBuilder
public EnhancedMetricsConfig.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<EnhancedMetricsConfig.Builder,EnhancedMetricsConfig>
-
builder
public static EnhancedMetricsConfig.Builder builder()
-
serializableBuilderClass
public static Class<? extends EnhancedMetricsConfig.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
-