Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RUM-1096 Fix os name in log events #1493

Merged
merged 1 commit into from
Sep 28, 2023
Merged

Conversation

maciejburda
Copy link
Contributor

What and why?

Fixes OS name for log events.

Before fix:
Screenshot 2023-09-26 at 16 19 33

After fix:
Screenshot 2023-09-26 at 16 18 05

How?

Change was quite simple. We should use osName instead of name from context.device.

Review checklist

  • Feature or bugfix MUST have appropriate tests (unit, integration)
  • Make sure each commit and the PR mention the Issue number or JIRA reference
  • Add CHANGELOG entry for user facing changes

Custom CI job configuration (optional)

  • Run unit tests for Core, RUM, Trace, Logs, CR and WVT
  • Run unit tests for Session Replay
  • Run integration tests
  • Run smoke tests
  • Run tests for tools/

@maciejburda maciejburda requested a review from a team as a code owner September 26, 2023 15:20
@maciejburda maciejburda changed the title RUM-1096 Fix os name in events RUM-1096 Fix os name in log events Sep 26, 2023
@maciejburda maciejburda merged commit 03465ca into develop Sep 28, 2023
2 checks passed
@maciejburda maciejburda deleted the maciey/RUM-1096-logs-os-name branch September 28, 2023 12:13
@ganeshnj
Copy link
Contributor

Looks like this change broke some test

testSendingLogWithDefaultLogger()

/Users/vagrant/git/DatadogCore/Tests/Datadog/LoggerTests.swift:58 - XCTAssertEqual failed: ("{
    "_dd" =     {
        device =         {
            architecture = testArch;
        };
    };
    "build_version" = 1;
    date = "2019-12-15T10:00:00.000Z";
    ddtags = "env:tests,version:1.0.0";
    "logger.name" = "com.datadoghq.ios-sdk";
    "logger.thread_name" = main;
    "logger.version" = "1.2.3";
    message = message;
    os =     {
        build = FFFFFF;
        name = abc;
        version = "1.0";
    };
    service = "default-service-name";
    status = debug;
    version = "1.0.0";
}") is not equal to ("{
    "_dd" =     {
        device =         {
            architecture = testArch;
        };
    };
    "build_version" = 1;
    date = "2019-12-15T10:00:00.000Z";
    ddtags = "env:tests,version:1.0.0";
    "logger.name" = "com.datadoghq.ios-sdk";
    "logger.thread_name" = main;
    "logger.version" = "1.2.3";
    message = message;
    os =     {
        build = FFFFFF;
        name = te...

@maciejburda
Copy link
Contributor Author

Thanks! I'll double check this.

@maciejburda maciejburda restored the maciey/RUM-1096-logs-os-name branch September 28, 2023 13:26
@maciejburda maciejburda deleted the maciey/RUM-1096-logs-os-name branch September 28, 2023 13:27
@maciejburda
Copy link
Contributor Author

#1499

@ncreated ncreated mentioned this pull request Sep 28, 2023
8 tasks
@ncreated ncreated mentioned this pull request Oct 17, 2023
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants