-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19356 from mbruin-NR/NR-334798
NR-334798 Created docs that explain the new auto collected logs in the iOS agent (December 3rd)
- Loading branch information
Showing
4 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
...ocs/mobile-monitoring/new-relic-mobile-ios/configuration/ios-remote-logging.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
title: Logging with the iOS agent | ||
tags: | ||
- Mobile logging | ||
- New Relic Mobile iOS | ||
metaDescription: Suggestions for setting up the logging in your app with the New Relic agent | ||
freshnessValidatedDate: never | ||
--- | ||
|
||
|
||
To ensure consistent and comprehensive logging throughout the project, the iOS agent provides logging APIs. Use the agent's logging APIs to send your mobile apps logs to New Relic. This ensures that your logs are at one place for your analysis. For more information, refer our [mobile logging API](/docs/mobile-monitoring/mobile-monitoring-ui/mobile-logs/#ios). | ||
|
||
|
||
## Configuring log levels | ||
|
||
You can configure the iOS agent log levels for the agent and remote logging. | ||
|
||
### Agent Log Level | ||
|
||
The agent log level is configured in the New Relic agent and determines which log messages are written to the device's console. This also includes the New Relic agent logs. To view all New Relic agent logs, set the log level to `NRLogLevelDebug`. | ||
|
||
|
||
### Remote Log Level | ||
|
||
In the New Relic platform, the remote log level controls the verbosity of logs sent from a device to New Relic. This helps to manage the data volume and keeps the focus on relevant information. | ||
|
||
**Configuration**: On the New Relic dashboard, you can set up the remote log level in <DNT>**Application**</DNT> tab. For more information on setting the remote log level, refer [mobile logs](/docs/mobile-monitoring/mobile-monitoring-ui/mobile-logs). | ||
|
||
|
||
|
||
## Automatic log collection | ||
|
||
In the New Relic platform, when the remote logging is enabled, the iOS agent collects all logs written on `stdout` and `stderr` from the app. It captures all calls to `NSLog()`, Swift `print()`, and other print-family functions. The logs collected this way are set to `NRLogLevelInfo`. This feature is disabled by default. To enable it, use the `NRFeatureFlag_AutoCollectLogs` feature flag. | ||
|
||
The agent separates log messages using a `'\n\n'` delimiter. The timestamp reflects when the agent collected the log, not when the application wrote it. This might cause difference of milliseconds as the log message was buffered before being collected by the agent. | ||
|
||
<Callout variant="important"> | ||
This feature interferes with Xcode's built-in console, so it can not be enabled while the debugger is attached. | ||
</Callout> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
...ent/docs/release-notes/mobile-release-notes/ios-release-notes/ios-agent-753.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
subject: iOS agent | ||
releaseDate: '2024-12-04' | ||
version: 7.5.3 | ||
downloadLink: 'https://download.newrelic.com/ios_agent/NewRelic_XCFramework_Agent_7.5.3.zip' | ||
--- | ||
|
||
## Fixed in this release | ||
* The tracked headers set in [addHTTPHeaderTrackingFor](/docs/mobile-monitoring/new-relic-mobile/mobile-sdk/add-tracked-headers) are now correctly added to network request events manually captured using [noticeNetworkRequestForURL](/docs/mobile-monitoring/new-relic-mobile/mobile-sdk/network-request-success). | ||
* Fixed a bug in the new event system that prevented adding an attribute with a key that contain a reserved key string as a prefix. | ||
* Made changes to address the `NRMA__deallocInteractionHistoryList` crash reported by users. | ||
|
||
## Other notes | ||
* The iOS agent now supports automatic log collection for remote logging. This feature is limited to `NSLog()`, Swift `print()`, and other print-family functions. To enable it, use the `NRFeatureFlag_AutoCollectLogs` feature flag. For more information on how to enable and configure remote logging, visit our [documentation](/docs/mobile-monitoring/new-relic-mobile-ios/configuration/ios-remote-logging). | ||
* Changed the agent to agent to consistently send the sampled flag as '01' (true) in the W3C Traceparent header to maintain trace continuity with OpenTelemetry agents, which expect '00' (false) for dropped spans and '01' (true) for sampled spans. | ||
|
||
## Support statement | ||
|
||
* As of iOS agent version 7.4.1, the iOS agent will consolidate previously separate XCFramework and tvOS agents into a singular iOS agent. | ||
* As of this release, the oldest supported version of the [XCFramework](/docs/release-notes/mobile-release-notes/ios-release-notes/xcframework-agent-736) is 7.3.6. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters