firebase / firebase/firebase-ios-sdk
[FR]: Allow setting the start time of the FIRTrace
- Dominant language
- C++
- Stars
- 6.7k
- Forks
- 1.8k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 75
Description
### Description
`FIRTrace` class encapsulates information about a single trace in Firebase Performance Analytics. `FIRTrace` contains a timestamp marking the start of the trace. The existing public API is automatically setting this property to the current time.
There are, however, use cases when setting a start time of the trace is necessary. An example of such a trace could be a performance trace from the earliest application startup time until the app interface is ready for interaction. In that case, we might want to create a custom trace and set its start time to the time we recorded when the app started, even before Firebase SDK was loaded.
### API Proposal
Add to `FIRTrace.h`:
```c
- (void)startWithStartTime:(nullable NSDate *)startTime;
```
Remove from `FIRTrace-Internal.h` (same line)
```c
- (void)startWithStartTime:(nullable NSDate *)startTime;
```
### Firebase Product(s)
Performance
Contributor guide
Research direction
Start by reading FIRTrace.h and FIRTrace-Internal.h and locating the existing startWithStartTime: declaration. Verify that the requested API is exposed in FIRTrace.h, removed from the internal header, and that the existing Performance trace behavior remains covered by the project’s tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- objective-c
- Domain
- analytics, performance
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100