Skip to content

Commit 4f933e1

Browse files
Liudmila Molkovatrask
andauthored
Apply suggestions from code review
Co-authored-by: Trask Stalnaker <[email protected]>
1 parent 456f377 commit 4f933e1

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

.chloggen/1716.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
change_type: enhancement
22
component: docs, db
3-
note: Add common guidance on recording errors on spans and metrics, clarify DB conventions.
3+
note: Add common guidance for recording errors on spans and metrics, clarify DB conventions.
44
issues: [1536, 1716]

docs/exceptions/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Semantic conventions for Exceptions are defined for the following signals:
1818

1919
**Status**: [Development][DocumentStatus]
2020

21-
When instrumented operation fails with an exception, instrumentation SHOULD record
21+
When an instrumented operation fails with an exception, instrumentation SHOULD record
2222
this exception as a [span event](exceptions-spans.md) or a [log record](exceptions-logs.md).
2323

2424
Recording exceptions on spans SHOULD be accompanied by
@@ -28,16 +28,16 @@ Recording exceptions on spans SHOULD be accompanied by
2828
Refer to the [Recording errors](/docs/general/recording-errors.md) document for additional
2929
details on how to record errors across different signals.
3030

31-
It's RECOMMENDED to use `Span.recordException` API or logging library API that takes exception instance
31+
It's RECOMMENDED to use the `Span.recordException` API or logging library API that takes exception instance
3232
instead of providing individual attributes. This enables the OpenTelemetry SDK to
3333
control what information is recorded based on application configuration.
3434

3535
It's NOT RECOMMENDED to record the same exception more than once.
3636
It's NOT RECOMMENDED to record exceptions that are handled by the instrumented library.
3737

38-
For example, in this code-snippet, `ResourceNotFoundException` is handled and corresponding
39-
native instrumentation should not record it. Other exceptions, that are propagated
40-
to the caller, should be recorded (or logged) once.
38+
For example, in this code-snippet, `ResourceAlreadyExistsException` is handled and the corresponding
39+
native instrumentation should not record it. Exceptions which are propagated
40+
to the caller should be recorded (or logged) once.
4141

4242
```java
4343
public boolean createIfNotExists(String resourceId) throws IOException {

docs/general/recording-errors.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ linkTitle: Recording errors
66

77
**Status**: [Development][DocumentStatus].
88

9-
This document provides recommendations to semantic conventions and instrumentation authors
9+
This document provides recommendations to semantic convention and instrumentation authors
1010
on how to record errors on spans and metrics.
1111

1212
Individual semantic conventions are encouraged to provide additional guidance.
1313

1414
## What constitutes an error
1515

16-
Operation SHOULD be considered as failed if any of the following is true:
16+
An operation SHOULD be considered as failed if any of the following is true:
1717

1818
- an exception is thrown by the instrumented method (API, block of code, or another instrumented unit)
1919
- the instrumented method returns an error in another way, for example, via an error code
@@ -31,7 +31,7 @@ Operation SHOULD be considered as failed if any of the following is true:
3131
> Instrumentations that have additional context about a specific request MAY use
3232
> this context to set the span status more precisely.
3333
34-
Errors that were retried or handled allowing operation to complete gracefully SHOULD NOT
34+
Errors that were retried or handled (allowing an operation to complete gracefully) SHOULD NOT
3535
be recorded on spans or metrics that describe this operation.
3636

3737
## How to record errors on spans

docs/http/http-spans.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ the client or server from sending/receiving the request/response fully.
117117
When instrumentation detects such errors it SHOULD set span status to `Error`
118118
and SHOULD set the `error.type` attribute.
119119

120-
Refer to the [Recording Errors](/docs/general/recording-errors.md) document for
120+
**Status**: [Development][DocumentStatus] - Refer to the [Recording Errors](/docs/general/recording-errors.md) document for
121121
general considerations on how to record span status.
122122

123123
## HTTP client

0 commit comments

Comments
 (0)