Skip to content

Commit 390e33c

Browse files
authored
Fragment readme creation and activity readme correction. (open-telemetry#866)
* started the fragment readme * fixes to activity readme * delete unnecessery info * linked in main readme + spotless * typo fix * typo
1 parent c0a957e commit 390e33c

File tree

3 files changed

+29
-3
lines changed

3 files changed

+29
-3
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Some of the additional features provided include:
5858
* [ANR detection](./instrumentation/anr/)
5959
* [Network change detection](./instrumentation/network/)
6060
* Android [Activity lifecycle instrumentation](./instrumentation/activity/)
61-
* Android Fragment lifecycle monitoring
61+
* Android [Fragment lifecycle monitoring](./instrumentation/fragment)
6262
* Access to the OpenTelemetry APIs for manual instrumentation
6363
* Helpers to redact any span from export, or change span attributes before export
6464
* Slow / frozen render detection

instrumentation/activity/README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,17 @@ This instrumentation produces the following telemetry:
2323
### Activity state change
2424

2525
* Type: Span
26-
* Name: {`Created` | `Resumed` | `Paused` | `Stopped` | `Destroyed`} (depends on the activity state transition)
26+
* Name: {`Created` | `Resumed` | `Paused` | `Stopped` | `Destroyed` | `Restarted` |} (depends on the activity state transition)
2727
* Description: As the activity transitions between states, a span will be created to represent the
2828
lifecycle of that state. Events are added for subsequent minor state changes.
2929
* SpanEvents: {
3030
`activityPreCreated` | `activityCreated` | `activityPostCreated` |
31+
`activityPreStarted` | `activityStarted` | `activityPostStarted` |
3132
`activityPreResumed` | `activityResumed` | `activityPostResumed` |
3233
`activityPrePaused` | `activityPaused` | `activityPostPaused` |
3334
`activityPreStopped` | `activityStopped` | `activityPostStopped` |
3435
`activityPreDestroyed` | `activityDestroyed` | `activityPostDestroyed` }
3536
* Attributes:
36-
* `activity.name`: <name of activity>
37+
* `activityName`: <name of activity>
3738
* `screen.name`: <name of screen>
39+
* `last.screen.name`: <name of screen>, only when span contains the `activityPostResumed` event.

instrumentation/fragment/README.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Fragment Instrumentation
2+
3+
Status: experimental
4+
5+
The fragment instrumentation helps to track the state of your application's Fragment lifecycle.
6+
7+
## Telemetry
8+
9+
This instrumentation produces the following telemetry:
10+
11+
### Fragment state change
12+
13+
* Type: Span
14+
* Name: {`Created` | `Restored` | `Resumed` | `Paused` | `Stopped` | `Destroyed` | `ViewDestroyed` | `Detached` |} (depends on the activity state transition)
15+
* Description: As the activity transitions between states, a span will be created to represent the
16+
lifecycle of that state. Events are added for subsequent minor state changes.
17+
* SpanEvents: {
18+
`fragmentPreAttached` | `fragmentAttached` | `fragmentPreCreated` | `fragmentCreated` | `fragmentViewCreated`
19+
`fragmentStarted` | `fragmentResumed` | `fragmentPaused` | `fragmentStopped` |
20+
`fragmentViewDestroyed` | `fragmentDestroyed` | `fragmentDetached` }
21+
* Attributes:
22+
* `fragmentName`: <name of fragment>
23+
* `screen.name`: <name of screen>
24+
* `last.screen.name`: <name of screen>, when span contains the `fragmentResumed` event.

0 commit comments

Comments
 (0)