╭────────────────────────────────────────────╮ | |
│ ✻ Welcome to Claude Code research preview! │ | |
╰────────────────────────────────────────────╯ | |
██████╗██╗ █████╗ ██╗ ██╗██████╗ ███████╗ | |
██╔════╝██║ ██╔══██╗██║ ██║██╔══██╗██╔════╝ | |
██║ ██║ ███████║██║ ██║██║ ██║█████╗ | |
██║ ██║ ██╔══██║██║ ██║██║ ██║██╔══╝ | |
╚██████╗███████╗██║ ██║╚██████╔╝██████╔╝███████╗ | |
╚═════╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝ |
# OpenTelemetry Code Analysis & Instrumentation | |
Analyze code and provide specific instrumentation recommendations optimized for Honeycomb, with a preference for using OpenTelemetry tracing if possible. | |
Support direct instructions, like "instrument this file" or "add tracing to this function." | |
## Rules to follow | |
Ignore metrics code, if it exists, for now. |
import ( | |
//... other imports | |
"go.opentelemetry.io/otel" | |
"go.opentelemetry.io/otel/attribute" | |
"go.opentelemetry.io/otel/trace" | |
) | |
var tracer = otel.Tracer("MyTracerName") | |
//... |
{"prompt": "Honeycomb AI suggests queries based on user input.\n\nCOLUMNS:error,error.type,error.msg,sqs.error,error.cause_chain,email,target,code.lineno,latency,id,name,http.url,transaction.id,code.namespace,type,duration_ms,provider,account.id,service.name,http.method,operation,busy_ns,idle_ns,status_code,library.name,http.host,classification,invitation_id,thread.id,thread.name,library.version,code.filepath,customer.payment.outbound.missing_in_internal,level,parent_name,adapter.payment.missing_in_internal,net.host.port,service.version,span.kind,organisation.id,http.scheme,sqs.outcome,internal_account.id,organisation_id,http.path,http.user_agent,http.status_code,trace.parent_id,span.num_events,sns.topic,http.route\n\nQUERY SPEC:\nAll top-level keys are optional.\n\n```json\n\"calculations\":[\n // ops: COUNT, CONCURRENCY, COUNT_DISTINCT, HEATMAP, SUM, AVG, MAX, MIN, P001, P01, P05, P10, P25, P50, P75, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX\n {\"op\": \"COUNT\"},// COUNT and CONCURRENCY are j |
func GetCosineSimilarity(a, b []float32, idx int) (float32, error) { | |
if len(a) != len(b) { | |
return 0, errors.New(fmt.Sprintf("vectors must have the same length: %d != %d, idx: %d", len(a), len(b), idx)) | |
} | |
var dotProduct float32 | |
for i := 0; i < len(a); i++ { | |
dotProduct += a[i] * b[i] | |
} | |
// openai vectors are already normed |
using OpenTelemetry; | |
using OpenTelemetry.Logs; | |
using OpenTelemetry.Resources; | |
using OpenTelemetry.Trace; | |
var builder = WebApplication.CreateBuilder(args); | |
var app = builder.Build(); | |
var appResourceBuilder = ResourceBuilder.CreateDefault() | |
.AddService(serviceName: Telemetry.ServiceName, serviceVersion: Telemetry.ServiceVersion); |
package main | |
import ( | |
"errors" | |
"go.opentelemetry.io/otel/attribute" | |
sdktrace "go.opentelemetry.io/otel/sdk/trace" | |
) | |
var ( |
Herein lies my thoughts on what the FSSF should seek to accomplish and why. Ultimately, it comes down to spending the money that we have to further the reach of the F# language. How that gets done could make for some challenging implementation details.
Like it or not, language adoption is a game in a market.
Java didn't overtake the world in the 90s because it was better than C++. It did it because Oracle pumped hundreds of millions of dollars into marketing efforts to get people to realize that it was more productive than C++. They even took out ads in newspapers.
And other times you don't need explicit marketing because you're the default language used for a platform (kotlin via Android, Swift via iOS) and you get to piggyback on the marketing for that platform instead. C# fills this role for Microsoft's stuff that's .NET-based. Yes, F# can "me too" here, but this is just a tiny drip of adoption (albeit steady).