Repository navigation
_base/bin/verify.sh: verified end to end on ClickStack 2.39.1 - #55
Merged
Merged
Conversation
…in-one:2.39.1 ships Read in clickhouse/clickstack-all-in-one:2.39.1 (otelcol-hyperdx 0.155.0), not from docs: - Receivers: /otelcontribcol components lists docker_stats, file_log, fluent_forward, host_metrics, k8s_cluster, kubelet_stats, nop, otlp, datadog and prometheus. filelog, fluentforward, hostmetrics and kubeletstats are accepted as aliases (validate --config); dockerstats and k8scluster are rejected; there is no statsd. Corrected in CONVENTIONS rule 4, otel-profiles README and the virt-vsphere README, both languages. - Rule 1: the all-in-one image always runs the OpAMP supervisor path (/etc/local/entry.base.sh exports OPAMP_SERVER_URL); agent.config_files is config.yaml then $CUSTOM_OTELCOL_CONFIG_FILE, with the OpAMP remote config merged after. The standalone branch in /otel-entrypoint.sh is not taken. - Rule 3: clickhouse and otlp/hyperdx are injected at runtime by the API (opampController.js), not defined in /etc/otelcol-contrib/config.yaml. - Rule 2: ClickStack's pipelines are bare traces and metrics plus named logs/in, logs/out-default and logs/out-rrweb; the rule itself is unchanged. - _base/README: the "standalone as well as supervisor" sentence now says what was read and what was not (the Cloud-side collector). No Verified line is written: bin/verify.sh has not run end to end yet (#52). Refs #52 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ted; vsphere targets otlp/hyperdx Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… on ClickStack 2.39.1 First end-to-end run of bin/verify.sh (#52). Layers 1 and 2 passed; layer 3 printed "searchable via HyperDX (1 rows)" for 200 stored rows. Cause, read from the running 2.39.1 API: - POST /api/v2/search with the lucene field `verify.run_id` returns {"message":"UNKNOWN_IDENTIFIER: ... `verify.run_id` ..."}; a resource attribute is addressed as `ResourceAttributes.verify.run_id`. - The script counted len(d.get('data', d)): for an error object that is the number of keys, so any error read as "1 rows" and passed. Now the lucene field is `ResourceAttributes.verify.run_id`, only a `data` list counts, and a response without one is a FAIL that prints the server's message. What the layer checks (rows found through the HyperDX search for this run_id, more than zero) is unchanged. With N=3, the old script passed with "1 rows", a copy with the old field name now fails with the UNKNOWN_IDENTIFIER message, and the fixed script passes with "3 rows". Full run, N=200: emitted 200, stored 200, searchable 200. README: the Verified on line, both languages (ClickStack 2.39.1, ClickHouse 26.8.7.19 from SELECT version(), telemetrygen v0.155.0). Refs #52 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #52
_base/bin/verify.shhas now run end to end onclickstack-all-in-one:2.39.1. The first run found that its third layer was wrong, so this PR fixes the script as well as recording the run. It also corrects the collector facts that the pinned image contradicted.What changed and why
_base/bin/verify.sh: the "searchable via HyperDX" layer passed when it should not have.PASS searchable via HyperDX (1 rows)while 200 rows were stored.POST /api/v2/searchwith the lucene fieldverify.run_idanswers{"message":"UNKNOWN_IDENTIFIER: Unknown expression or function identifierverify.run_id..."}. A resource attribute is addressed asResourceAttributes.verify.run_id.len(d.get('data', d)). For an error object that is the number of keys, so any error read as "1 rows" and passed.ResourceAttributes.verify.run_id, only adatalist counts, and a response without one is aFAILthat prints the server's message.run_id, more than zero.N=3: the old script passed with1 rows; a copy with the old field name now printsFAIL ... UNKNOWN_IDENTIFIER ...and exits 1; the fixed script passes with3 rows._base/README.md:**Verified on:**line in both languages, and the "standalone as well as supervisor" sentence corrected.otel-profiles/CONVENTIONS.md,otel-profiles/README.md,otel-profiles/profiles/virt-vsphere/README.md: collector facts corrected, both languages (see below).How it was run
_base/docker-compose.yml, default profile only,clickstack-all-in-one:2.39.1, on empty volumes.POST /register/password, generated@example.comemail and password). Its ingestion key (/team) and personal access key (/me) were appended to an untracked, mode 600_base/.envand are not in this PR, its description or its commits (a count-only scan of the branch diff and tracked files for all four values found zero occurrences). This is how this run got its keys; it does not change how the README tells a reader to get them (the UI).bin/check.shbin/verify.sh(full run,N=200, the fixed script)telemetrygen emits about one log per second, so the run takes about four minutes.
Negative control
telemetrygen (same image and tag as
verify.sh) with a wrongauthorizationheader and its ownverify.run_id, 20 logs:telemetrygen exited 1:
failed to export batched logs ... rpc error: code = Unauthenticated desc = provided authorization does not match expected scheme or token. Then, polled for 60 s (12 x 5 s, asverify.shwaits), as theapiClickHouse user:The same query shape returns 200 for the
verify.shruns' ids, so the 0 is a result and not a broken query. A request with noauthorizationheader at all to OTLP/HTTP:4318is answered401 {"code":16,"message":"missing or empty authorization header: Authorization"}.Layer 1 on the real script:
./bin/verify.shwith a scratch env file carrying a bogusHYPERDX_INGESTION_KEYprintsFAIL emitted 200 logsand exits 1.Versions
SELECT version()against the running server returned26.8.7.19(also in thecheck.shoutput above).GET /healthreturned"version":"2.39.1"; container imageclickhouse/clickstack-all-in-one:2.39.1.otelcol-hyperdx0.155.0 (/otelcontribcol --version).v0.155.0.Collector facts read from the image
Read inside
clickhouse/clickstack-all-in-one:2.39.1(otelcol-hyperdx0.155.0), not from docs:/otelcontribcol components:datadog docker_stats file_log fluent_forward host_metrics k8s_cluster kubelet_stats nop otlp prometheusattributes batch cumulativetodelta filter groupbyattrs k8s_attributes log_dedup memory_limiter metrics_transform probabilistic_sampler redaction resource resource_detection span tail_sampling transformclickhouse debug nop otlp_grpc otlp_http prometheus_remote_writeforward routing span_metricsbearertokenauth file_storage health_check memory_limiter oidc opamp pprof zpages/otelcontribcol validate --config "yaml:...", one receiver per run in a throwaway container:filelog,fluentforward,hostmetrics,kubeletstatsare accepted as aliases;docker_statsandk8s_clusterare accepted;dockerstatsandk8sclusterare rejected as unknown types;statsdis not in this build. The processorsresourcedetectionandmetricstransformare accepted next toresource_detectionandmetrics_transform.CUSTOM_OTELCOL_CONFIG_FILEis loaded./etc/local/entry.base.shexportsOPAMP_SERVER_URL, so/otel-entrypoint.shtakes its supervisor branch and startsopampsupervisor./etc/otel/supervisor.yaml.tmplrendersagent.config_filesas/etc/otelcol-contrib/config.yamlfollowed by$CUSTOM_OTELCOL_CONFIG_FILE(only if set).--config config.yaml --config standalone-config.yaml --config $CUSTOM_OTELCOL_CONFIG_FILE) exists in/otel-entrypoint.shbut is not taken by the all-in-one image, and/etc/otelcol-contrib/there holds onlyconfig.yaml./etc/otelcol-contrib/config.yamldefinestransform,resourcedetection,batch(send_batch_size10000,timeout5s) andmemory_limiter(limit_mib1500). Its pipelines aretracesandmetrics(memory_limiter, batch),logs/out-default(memory_limiter, transform, batch) andlogs/out-rrweb(memory_limiter, batch).clickhouse,clickhouse/rrwebandotlp/hyperdxare not inconfig.yaml./app/packages/api/build/opamp/controllers/opampController.jsbuilds them, plus thelogs/inpipeline and therouting/logsconnector.otlp/hyperdxis attached totraces,metricsandlogs/inonly when a team has an API key (orINGESTION_API_KEYis set). When the team hascollectorAuthenticationEnforced(set to true byPOST /register/password), abearertokenauth/hyperdxextension withscheme: ''and the key in bare andBearer-prefixed forms guards both OTLP protocols./app/packages/api/build/routers/api/root.js:GET /installation(isTeamExisting),POST /register/password(409 if a team exists).routers/api/me.js:GET /mereturnsaccessKey.routers/api/team.js:GET /teamreturnsapiKey. Password rule frompackages/common-utils/dist/validation.js: 12 to 72 characters with upper case, lower case, a digit and a special character.routers/external-api/v2/search.js:sourceId,where,whereLanguage(lucene by default),maxResults(1 to 2000), and a 15-minute default window; the response is{data, rows}. Errors are{message}.Corrections made from these (both languages):
CONVENTIONS.mdrules 1 to 4, the receiver lists inotel-profiles/README.mdandvirt-vsphere/README.md, and_base/README.md's standalone sentence. The merge-order consequence of a bare pipeline key (rule 2) is marked as read from the code, not tested.Not run
STATUS.mdis untouched (issue _base/bin/verify.sh: run it end to end once and record what it ran on #52's "Done" list mentions it; that change is not in this PR)./otel-entrypoint.sh, and the collector that runs next to a ClickHouse Cloud service: neither was exercised.traces:/metrics:key in a custom config loses the profile's receiver or ClickStack's OTLP ingestion on the supervisor path: not tested.:4318) with a valid key, andverify.shwithOTLP_ENDPOINToverridden.elastic,elastic-secureandmigrationprofiles were not started;check.shreports their ClickHouse target asSKIP.custom.config.yaml/sidecar.config.yaml) were linted and merged (lint.sh,build-config.sh) but not loaded into a running collector.lint.sh, the twobuild-config.shmerges,check_links.py,check_syntax.sh,bash -n _base/bin/verify.sh, and gitleaks on the branch.verify.shfails layer 1 because the key is wrong, its hint still says "is OTLP on :4317 reachable?" (telemetrygen's output is discarded). I did not change that message.🤖 Generated with Claude Code