Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

feat: timber integration #464

Merged
merged 15 commits into from
Jun 25, 2020
Merged

feat: timber integration #464

merged 15 commits into from
Jun 25, 2020

Conversation

marandaneto
Copy link
Contributor

@marandaneto marandaneto commented Jun 18, 2020

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

feat: timber integration

💡 Motivation and Context

one may raise events from Timber

💚 How did you test it?

running and unit tests

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • All tests passing

🔮 Next steps

revert manifest and self init, but we need to define the sample somewhere

// let's take only the 1st line as this is probably the only message written by the user.
// or the 1st line of the exception which is probably the same as event.title
// eg java.lang.Exception: java.lang.Exception: java.lang.Exception: Some exception.
// timber should offer a way of disabling it
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marandaneto marandaneto marked this pull request as ready for review June 22, 2020 15:22
Copy link
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to put the whole integration in a folder that is called logging-integrations or would you do this once we have more integrations?
Overall really nice job 👍

import kotlin.test.assertEquals
import timber.log.Timber

class SentryTimberIntegrationTest {
Copy link
Member

@philipphofmann philipphofmann Jun 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

m: It would be nice to have an integration test for testing the whole integration with our SDK. Checking if running the following code and then logging via timber actually passes the timber events to our SDK.

SentryAndroid.init(
    this,
    options -> {
      options.addIntegration(new SentryTimberIntegration());
    });

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mm it's possible, but we don't do this for any other integration I guess, as what really matters is the Hub to be called and this is already tested -> SentryTimberTreeTest
I'll check that though

@marandaneto marandaneto requested a review from HazAT June 23, 2020 12:58
Copy link
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job 👏

@marandaneto marandaneto merged commit 48ddf38 into getsentry:master Jun 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants