@@ -40,9 +40,9 @@ public async Task BasicOpenTelemetryTest()
40
40
41
41
await client . SearchAsync < Project > ( s => s . Index ( "test" ) . Query ( q => q . MatchAll ( m => { } ) ) ) ;
42
42
43
- VerifyActivity ( oTelActivity , "search" , "GET " , "http://localhost:9200/test/_search?pretty=true&error_trace=true" ) ;
43
+ VerifyActivity ( oTelActivity , "search" , "POST " , "http://localhost:9200/test/_search?pretty=true&error_trace=true" ) ;
44
44
45
- static void VerifyActivity ( Activity oTelActivity , string operation , string displayName , string url = null )
45
+ static void VerifyActivity ( Activity oTelActivity , string displayName , string operation , string url = null )
46
46
{
47
47
oTelActivity . Should ( ) . NotBeNull ( ) ;
48
48
@@ -53,13 +53,13 @@ static void VerifyActivity(Activity oTelActivity, string operation, string displ
53
53
54
54
oTelActivity . Tags . Should ( ) . Contain ( n => n . Key == "elastic.transport.product.name" && n . Value == "elasticsearch-net" ) ;
55
55
oTelActivity . Tags . Should ( ) . Contain ( n => n . Key == "db.system" && n . Value == "elasticsearch" ) ;
56
- oTelActivity . Tags . Should ( ) . Contain ( n => n . Key == "db.operation" && n . Value == operation ) ;
56
+ oTelActivity . Tags . Should ( ) . Contain ( n => n . Key == "db.operation" && n . Value == displayName ) ;
57
57
oTelActivity . Tags . Should ( ) . Contain ( n => n . Key == "db.user" && n . Value == "elastic" ) ;
58
58
oTelActivity . Tags . Should ( ) . Contain ( n => n . Key == "url.full" && n . Value == ( url ?? "http://localhost:9200/?pretty=true&error_trace=true" ) ) ;
59
59
oTelActivity . Tags . Should ( ) . Contain ( n => n . Key == "server.address" && n . Value == "localhost" ) ;
60
- oTelActivity . Tags . Should ( ) . Contain ( n => n . Key == "http.request.method" && n . Value == ( operation == "ping" ? "HEAD" : "POST" ) ) ;
60
+ oTelActivity . Tags . Should ( ) . Contain ( n => n . Key == "http.request.method" && n . Value == ( displayName == "ping" ? "HEAD" : "POST" ) ) ;
61
61
62
- switch ( operation )
62
+ switch ( displayName )
63
63
{
64
64
case "search" :
65
65
oTelActivity . Tags . Should ( ) . Contain ( n => n . Key == "db.elasticsearch.path_parts.index" && n . Value == "test" ) ;
0 commit comments