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

Move CodeWhispererTelemetryService metrics to OTel #5041

Open
wants to merge 31 commits into
base: main
Choose a base branch
from

Conversation

rli
Copy link
Contributor

@rli rli commented Nov 1, 2024

License

I confirm that my contribution is made under the terms of the Apache 2.0 license.

@rli rli requested a review from a team as a code owner November 1, 2024 22:11
Base automatically changed from rli/move-q-tel-helper-otel to main November 7, 2024 01:48
Copy link

github-actions bot commented Nov 7, 2024

Qodana Community for JVM

15 new problems were found

Inspection name Severity Problems
Usage of redundant or deprecated syntax or deprecated symbols 🔶 Warning 14
Nested lambda has shadowed implicit parameter ◽️ Notice 1

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at [email protected]

@@ -167,7 +167,7 @@
getRequestContext(triggerTypeInfo, editor, project, psiFile, latencyContext)
} catch (e: Exception) {
LOG.debug { e.message.toString() }
CodeWhispererTelemetryService.getInstance().sendFailedServiceInvocationEvent(project, e::class.simpleName)
CodeWhispererTelemetryService.getInstance().sendFailedServiceInvocationEvent(e)

Check warning

Code scanning / QDJVMC

Usage of redundant or deprecated syntax or deprecated symbols Warning

'sendFailedServiceInvocationEvent(kotlin.Exception /* = java.lang.Exception */): Unit' is deprecated. Does not capture entire context of method call
@@ -174,7 +174,7 @@
getRequestContext(triggerTypeInfo, editor, project, psiFile)
} catch (e: Exception) {
LOG.debug { e.message.toString() }
CodeWhispererTelemetryServiceNew.getInstance().sendFailedServiceInvocationEvent(project, e::class.simpleName)
CodeWhispererTelemetryServiceNew.getInstance().sendFailedServiceInvocationEvent(e)

Check warning

Code scanning / QDJVMC

Usage of redundant or deprecated syntax or deprecated symbols Warning

'sendFailedServiceInvocationEvent(kotlin.Exception /* = java.lang.Exception */): Unit' is deprecated. Does not capture entire context of method call
.codewhispererSessionId(responseContext.sessionId)
.codewhispererSuggestionIndex(index)
.codewhispererSuggestionReferenceCount(recommendation.references().size)
.codewhispererSuggestionReferences(jacksonObjectMapper().writeValueAsString(recommendation.references().map { it.licenseName() }.toSet().toList()))

Check notice

Code scanning / QDJVMC

Nested lambda has shadowed implicit parameter Note

Implicit parameter 'it' of enclosing lambda is shadowed
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.

2 participants