Skip to content

Commit

Permalink
Minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jterapin committed Jul 24, 2024
1 parent b942bfe commit 4a1c0a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ public static RubySettings from(ObjectNode config) {
settings.setGemVersion(gemspec.expectStringMember(GEM_VERSION).getValue());
settings.setGemSummary(gemspec.expectStringMember(GEM_SUMMARY).getValue());


LOGGER.info("Created Ruby Settings: " + settings);

return settings;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,6 @@ private void renderOperation(RubyCodeWriter writer, OperationShape operation) {
String classOperationName = symbolProvider.toSymbol(operation).getName();
String operationName = RubyFormatter.toSnakeCase(classOperationName);
boolean isStreaming = Streaming.isStreaming(model, outputShape);
String telemetryTracerName =
settings.getModule().replace("::", ".").toLowerCase()
+ "."
+ getModule().toLowerCase();
String telemetryServiceSpanName = StringUtils.trim(settings.getSdkId());

writer
.write("")
Expand All @@ -203,7 +198,8 @@ private void renderOperation(RubyCodeWriter writer, OperationShape operation) {
}
})
.write("config = operation_config(options)")
.write("tracer = config.telemetry_provider.tracer_provider.tracer('$L')", telemetryTracerName)
.write("tracer = config.telemetry_provider.tracer_provider.tracer('$L')",
nameSpace().replace("::", ".").toLowerCase())
.write("input = Params::$L.build(params, context: 'params')",
symbolProvider.toSymbol(inputShape).getName())
.write("stack = $L::Middleware::$L.build(config)",
Expand All @@ -227,7 +223,7 @@ private void renderOperation(RubyCodeWriter writer, OperationShape operation) {
.closeBlock("}")
.openBlock("tracer.in_span('$L.$L', attributes: attributes, "
+ "kind: Hearth::Telemetry::SpanKind::CLIENT) do",
telemetryServiceSpanName, classOperationName)
StringUtils.trim(settings.getSdkId()), classOperationName)
.write("context.config.logger.info(\"[#{context.invocation_id}] [#{self.class}#$L] params: #{params}, "
+ "options: #{options}\")", operationName)
.write("output = stack.run(input, context)")
Expand Down

0 comments on commit 4a1c0a2

Please sign in to comment.