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
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
9a3743d
Add OpenTelemetry base classes
rli Oct 17, 2024
1ae437e
Merge remote-tracking branch 'origin/main' into rli/otel
rli Oct 21, 2024
0769a77
lint
rli Oct 21, 2024
5d087e3
Merge remote-tracking branch 'origin/main' into rli/otel
rli Oct 22, 2024
b1ef95f
build
rli Oct 22, 2024
0a4e9ca
tst
rli Oct 22, 2024
c34c51c
lint
rli Oct 22, 2024
ddf6db9
hack in 233
rli Oct 24, 2024
7d90796
lint
rli Oct 24, 2024
f5e4c31
wip
rli Oct 25, 2024
f3d4c32
Merge remote-tracking branch 'origin/main' into rli/otel
rli Oct 25, 2024
eeb5b78
cleanup
rli Oct 28, 2024
201590c
Merge remote-tracking branch 'origin/main' into rli/otel
rli Oct 28, 2024
68ac68f
revert
rli Oct 28, 2024
37d92e3
revert
rli Oct 28, 2024
8389744
redundant
rli Oct 28, 2024
332ecb2
build
rli Oct 28, 2024
1f4cb7d
Merge remote-tracking branch 'origin/main' into rli/otel
rli Oct 30, 2024
11a9506
Tweak otelbase classes slightly to meet requirements from generator
rli Oct 30, 2024
551b153
lint
rli Oct 31, 2024
07018b2
Merge branch 'rli/otel' into rli/add-otel
rli Oct 31, 2024
8b30755
Move Q Chat 'TelemetryHelper' metrics to OTel
rli Oct 31, 2024
4b66203
Move CodeWhispererTelemetryService metrics to OTel
rli Nov 1, 2024
b096f26
Merge remote-tracking branch 'origin/main' into rli/move-q-tel-helper…
rli Nov 6, 2024
06c3878
Merge branch 'rli/move-q-tel-helper-otel' into rli/move-cw-tel-servic…
rli Nov 6, 2024
c30c6aa
lint
rli Nov 6, 2024
56fd69d
tst
rli Nov 6, 2024
8cfb058
Merge branch 'rli/move-q-tel-helper-otel' into rli/move-cw-tel-servic…
rli Nov 7, 2024
4f2b7c9
Merge branch 'main' into rli/move-cw-tel-service-otel
rli Nov 7, 2024
abd1f14
Merge remote-tracking branch 'origin/main' into rli/move-cw-tel-servi…
rli Nov 8, 2024
5a29b26
lint
rli Nov 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 on line 170 in plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/service/CodeWhispererService.kt

View workflow job for this annotation

GitHub Actions / Qodana Community for JVM

Usage of redundant or deprecated syntax or deprecated symbols

'sendFailedServiceInvocationEvent(kotlin.Exception /\* = java.lang.Exception \*/): Unit' is deprecated. Does not capture entire context of method call

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
return
}

Expand Down Expand Up @@ -261,7 +261,7 @@
lastRecommendationIndex += response.completions().size
ApplicationManager.getApplication().messageBus.syncPublisher(CODEWHISPERER_CODE_COMPLETION_PERFORMED)
.onSuccess(requestContext.fileContextInfo)
CodeWhispererTelemetryService.getInstance().sendServiceInvocationEvent(

Check warning on line 264 in plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/service/CodeWhispererService.kt

View workflow job for this annotation

GitHub Actions / Qodana Community for JVM

Usage of redundant or deprecated syntax or deprecated symbols

'sendServiceInvocationEvent(String, RequestContext, ResponseContext, Int, Boolean, Double, String?): Unit' is deprecated. Does not capture entire context of method call
requestId,
requestContext,
responseContext,
Expand Down Expand Up @@ -332,7 +332,7 @@
val exceptionType = e::class.simpleName
val responseContext = ResponseContext(sessionId)

CodeWhispererTelemetryService.getInstance().sendServiceInvocationEvent(

Check warning on line 335 in plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/service/CodeWhispererService.kt

View workflow job for this annotation

GitHub Actions / Qodana Community for JVM

Usage of redundant or deprecated syntax or deprecated symbols

'sendServiceInvocationEvent(String, RequestContext, ResponseContext, Int, Boolean, Double, String?): Unit' is deprecated. Does not capture entire context of method call
requestId,
requestContext,
responseContext,
Expand Down Expand Up @@ -400,7 +400,7 @@
val responseContext = ResponseContext(sessionId)
CodeWhispererInvocationStatus.getInstance().setInvocationSessionId(sessionId)
logServiceInvocation(requestId, requestContext, responseContext, emptyList(), null, exceptionType)
CodeWhispererTelemetryService.getInstance().sendServiceInvocationEvent(

Check warning on line 403 in plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/service/CodeWhispererService.kt

View workflow job for this annotation

GitHub Actions / Qodana Community for JVM

Usage of redundant or deprecated syntax or deprecated symbols

'sendServiceInvocationEvent(String, RequestContext, ResponseContext, Int, Boolean, Double, String?): Unit' is deprecated. Does not capture entire context of method call
requestId,
requestContext,
responseContext,
Expand Down Expand Up @@ -500,7 +500,7 @@
// since it won't be sent automatically later
if (nextStates.recommendationContext.details.isEmpty() && response.nextToken().isEmpty()) {
LOG.debug { "Received just an empty list from this session, requestId: $requestId" }
CodeWhispererTelemetryService.getInstance().sendUserDecisionEvent(

Check warning on line 503 in plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/service/CodeWhispererService.kt

View workflow job for this annotation

GitHub Actions / Qodana Community for JVM

Usage of redundant or deprecated syntax or deprecated symbols

'sendUserDecisionEvent(RequestContext, ResponseContext, DetailContext, Int, CodewhispererSuggestionState, Int): Unit' is deprecated. Does not capture entire context of method call
requestContext,
responseContext,
DetailContext(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 on line 177 in plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/service/CodeWhispererServiceNew.kt

View workflow job for this annotation

GitHub Actions / Qodana Community for JVM

Usage of redundant or deprecated syntax or deprecated symbols

'sendFailedServiceInvocationEvent(kotlin.Exception /\* = java.lang.Exception \*/): Unit' is deprecated. Does not capture entire context of method call

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
return
}
val caretContext = requestContext.fileContextInfo.caretContext
Expand Down Expand Up @@ -274,7 +274,7 @@
lastRecommendationIndex += response.completions().size
ApplicationManager.getApplication().messageBus.syncPublisher(CODEWHISPERER_CODE_COMPLETION_PERFORMED)
.onSuccess(requestContext.fileContextInfo)
CodeWhispererTelemetryServiceNew.getInstance().sendServiceInvocationEvent(

Check warning on line 277 in plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/service/CodeWhispererServiceNew.kt

View workflow job for this annotation

GitHub Actions / Qodana Community for JVM

Usage of redundant or deprecated syntax or deprecated symbols

'sendServiceInvocationEvent(Int, String, RequestContextNew, ResponseContext, Int, Boolean, Double, String?): Unit' is deprecated. Does not capture entire context of method call
currentJobId,
requestId,
requestContext,
Expand Down Expand Up @@ -369,7 +369,7 @@
val exceptionType = e::class.simpleName
val responseContext = ResponseContext(sessionId)

CodeWhispererTelemetryServiceNew.getInstance().sendServiceInvocationEvent(

Check warning on line 372 in plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/service/CodeWhispererServiceNew.kt

View workflow job for this annotation

GitHub Actions / Qodana Community for JVM

Usage of redundant or deprecated syntax or deprecated symbols

'sendServiceInvocationEvent(Int, String, RequestContextNew, ResponseContext, Int, Boolean, Double, String?): Unit' is deprecated. Does not capture entire context of method call
currentJobId,
requestId,
requestContext,
Expand Down Expand Up @@ -435,7 +435,7 @@
val responseContext = ResponseContext(sessionId)
CodeWhispererInvocationStatusNew.getInstance().setInvocationSessionId(sessionId)
logServiceInvocation(requestId, requestContext, responseContext, emptyList(), null, exceptionType)
CodeWhispererTelemetryServiceNew.getInstance().sendServiceInvocationEvent(

Check warning on line 438 in plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/service/CodeWhispererServiceNew.kt

View workflow job for this annotation

GitHub Actions / Qodana Community for JVM

Usage of redundant or deprecated syntax or deprecated symbols

'sendServiceInvocationEvent(Int, String, RequestContextNew, ResponseContext, Int, Boolean, Double, String?): Unit' is deprecated. Does not capture entire context of method call
currentJobId,
requestId,
requestContext,
Expand Down Expand Up @@ -533,7 +533,7 @@
// TODO: may have bug; visit later
if (nextStates.recommendationContext.details.isEmpty()) {
LOG.debug { "Received just an empty list from this session, requestId: $requestId" }
CodeWhispererTelemetryServiceNew.getInstance().sendUserDecisionEvent(

Check warning on line 536 in plugins/amazonq/codewhisperer/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codewhisperer/service/CodeWhispererServiceNew.kt

View workflow job for this annotation

GitHub Actions / Qodana Community for JVM

Usage of redundant or deprecated syntax or deprecated symbols

'sendUserDecisionEvent(RequestContextNew, ResponseContext, DetailContextNew, Int, CodewhispererSuggestionState, Int): Unit' is deprecated. Does not capture entire context of method call
requestContext,
responseContext,
DetailContextNew(
Expand Down
Loading
Loading