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

[FEATURE] Kotlin Support #24

Open
jasonmcaffee opened this issue Jan 12, 2024 · 5 comments
Open

[FEATURE] Kotlin Support #24

jasonmcaffee opened this issue Jan 12, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@jasonmcaffee
Copy link

Is your feature request related to a problem? Please describe.

I would love to be able to use features like View Logs from our Kotlin projects.

Additional context

We have a lot of Kotlin services and are looking to move our logging to Datadog.

@jasonmcaffee jasonmcaffee added the enhancement New feature or request label Jan 12, 2024
@abrooksv
Copy link
Contributor

abrooksv commented Jan 12, 2024

We currently do strive to have support for the log links in Kotlin code, but we do have a known bug related to IntelliJ 2023.3 where the links are not showing up and are hoping to have a fix out very soon.

@abrooksv
Copy link
Contributor

abrooksv commented Jan 12, 2024

Hey @jasonmcaffee, we have uploaded version 1.2.2 to Github with the bug fix. The update is pending JetBrains approval for in-IDE updates but the zip can be installed manually through Settings->Plugins->Gear Icon->Install from disk

Let us know if you have any issues

@jasonmcaffee
Copy link
Author

jasonmcaffee commented Jan 12, 2024

Wow, thanks for such a quick turnaround! Yes, after updating Intellij, I was able to install from disk, then View Logs started showing up in Kotlin!

One issue is that it's incorrectly filtering the logger name.

slf4j code:

private val log = LoggerFactory.getLogger(Redacted::class.java)

If I click on View Logs, the datadog log filter is @logger.name:com.redacted.controller.Redacted, and that yields no results. If I remove ".name", it works as expected.

The event attributes just have logger: com.redacted.controller.Redacted, but not logger.name

@bric3
Copy link
Contributor

bric3 commented Jan 15, 2024

@jasonmcaffee Thanks for the feedback. I'm not exactly sure could this come from

  1. The logs ingestion configuration, maybe they are specific rules that maps the logger name to logger. I don't think the IDE has access to these rules at this time.

  2. The logs implementation is configured to emit the logger name as logger.

Maybe you can share some details ?


EDIT: fixed a typo (wrote "I'm exactly sure" while I meant "I'm not exactly sure")

@jfree
Copy link
Contributor

jfree commented Jan 15, 2024

Let's find a solution to this. The logger.name used in the IDE is based on the documentation here: https://docs.datadoghq.com/logs/log_configuration/attributes_naming_convention/#source-code
So the ideal solution would be to amend the tagging on the client system. However, if that is not possible for whatever reason, we should consider adding an override in the IDE settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants