Package org.springframework.http.server.observation

# Class DefaultServerRequestObservationConvention

java.lang.Object
org.springframework.http.server.observation.DefaultServerRequestObservationConvention

All Implemented Interfaces:
  `io.micrometer.observation.KeyValuesConvention`, `io.micrometer.observation.ObservationConvention<ServerRequestObservationContext>`, `ServerRequestObservationConvention`

public class DefaultServerRequestObservationConvention extends Object implements ServerRequestObservationConvention
Default `ServerRequestObservationConvention`.

Since:
  6.0
Author:
  Brian Clozel

## Field Summary

### Fields inherited from interface io.micrometer.observation.ObservationConvention

`EMPTY`

## Constructor Summary

Constructors
Constructor
Description
`DefaultServerRequestObservationConvention()`
Create a convention with the default name `"http.server.requests"`.
`DefaultServerRequestObservationConvention(String name)`
Create a convention with a custom name.

## Method Summary

Modifier and Type
Method
Description
`protected io.micrometer.common.KeyValue`
`exception(ServerRequestObservationContext context)`
`String`
`getContextualName(ServerRequestObservationContext context)`
`io.micrometer.common.KeyValues`
`getHighCardinalityKeyValues(ServerRequestObservationContext context)`
`io.micrometer.common.KeyValues`
`getLowCardinalityKeyValues(ServerRequestObservationContext context)`
`String`
`getName()`
`protected io.micrometer.common.KeyValue`
`httpUrl(ServerRequestObservationContext context)`
`protected io.micrometer.common.KeyValue`
`method(ServerRequestObservationContext context)`
`protected io.micrometer.common.KeyValue`
`outcome(ServerRequestObservationContext context)`
`protected io.micrometer.common.KeyValue`
`status(ServerRequestObservationContext context)`
`protected io.micrometer.common.KeyValue`
`uri(ServerRequestObservationContext context)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.springframework.http.server.observation.ServerRequestObservationConvention

`supportsContext`

## Constructor Details

### DefaultServerRequestObservationConvention

public DefaultServerRequestObservationConvention()
Create a convention with the default name `"http.server.requests"`.

### DefaultServerRequestObservationConvention

public DefaultServerRequestObservationConvention(String name)
Create a convention with a custom name.

Parameters:
  `name` - the observation name

## Method Details

### getName

public String getName()

Specified by:
  `getName` in interface `io.micrometer.observation.ObservationConvention<ServerRequestObservationContext>`

### getContextualName

@Nullable public String getContextualName(ServerRequestObservationContext context)

Specified by:
  `getContextualName` in interface `io.micrometer.observation.ObservationConvention<ServerRequestObservationContext>`

### getLowCardinalityKeyValues

public io.micrometer.common.KeyValues getLowCardinalityKeyValues(ServerRequestObservationContext context)

Specified by:
  `getLowCardinalityKeyValues` in interface `io.micrometer.observation.ObservationConvention<ServerRequestObservationContext>`

### getHighCardinalityKeyValues

public io.micrometer.common.KeyValues getHighCardinalityKeyValues(ServerRequestObservationContext context)

Specified by:
  `getHighCardinalityKeyValues` in interface `io.micrometer.observation.ObservationConvention<ServerRequestObservationContext>`

### method

protected io.micrometer.common.KeyValue method(ServerRequestObservationContext context)

### status

protected io.micrometer.common.KeyValue status(ServerRequestObservationContext context)

### uri

protected io.micrometer.common.KeyValue uri(ServerRequestObservationContext context)

### exception

protected io.micrometer.common.KeyValue exception(ServerRequestObservationContext context)

### outcome

protected io.micrometer.common.KeyValue outcome(ServerRequestObservationContext context)

### httpUrl

protected io.micrometer.common.KeyValue httpUrl(ServerRequestObservationContext context)