{"record":{"id":"9485e383e8d258d1","repo":"openzipkin/zipkin","slug":"endts-0","errorCode":null,"errorMessage":"endTs <= 0","messagePattern":"endTs <= 0","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"zipkin-storage/cassandra/src/main/java/zipkin2/storage/cassandra/CassandraSpanStore.java","lineNumber":292,"sourceCode":"  @Override public Call<List<String>> getServiceNames() {\n    if (!searchEnabled) return Call.emptyList();\n    return serviceNames.clone();\n  }\n\n  @Override public Call<List<String>> getRemoteServiceNames(String serviceName) {\n    if (serviceName.isEmpty() || !searchEnabled || remoteServiceNames == null) {\n      return Call.emptyList();\n    }\n    return remoteServiceNames.create(serviceName);\n  }\n\n  @Override public Call<List<String>> getSpanNames(String serviceName) {\n    if (serviceName.isEmpty() || !searchEnabled) return Call.emptyList();\n    return spanNames.create(serviceName);\n  }\n\n  @Override public Call<List<DependencyLink>> getDependencies(long endTs, long lookback) {\n    if (endTs <= 0) throw new IllegalArgumentException(\"endTs <= 0\");\n    if (lookback <= 0) throw new IllegalArgumentException(\"lookback <= 0\");\n    return dependencies.create(endTs, lookback);\n  }\n\n  static final class TimestampRange {\n    long startMillis;\n    UUID startUUID;\n    long endMillis;\n    UUID endUUID;\n  }\n\n  TimestampRange timestampRange(QueryRequest request, int indexTtl) {\n    long oldestData = Math.max(System.currentTimeMillis() - indexTtl * 1000L, 0); // >= 1970\n    TimestampRange result = new TimestampRange();\n    result.startMillis = Math.max((request.endTs() - request.lookback()), oldestData);\n    result.startUUID = Uuids.startOf(result.startMillis);\n    result.endMillis = Math.max(request.endTs(), oldestData);\n    result.endUUID = Uuids.endOf(result.endMillis);","sourceCodeStart":274,"sourceCodeEnd":310,"githubUrl":"https://github.com/openzipkin/zipkin/blob/878ce2a1fad54ca941d17fdcf2e1d924b148eb1f/zipkin-storage/cassandra/src/main/java/zipkin2/storage/cassandra/CassandraSpanStore.java#L274-L310","documentation":"CassandraSpanStore.getDependencies throws IllegalArgumentException ('endTs <= 0') when a non-positive end timestamp is passed to the dependency-link query. endTs anchors the aggregation window (endTs - lookback .. endTs); zero or negative values mean an unset/misparsed timestamp, and the Cassandra dependencies query cannot bucket them, so it fails fast.","triggerScenarios":"Calling storage.spanStore().getDependencies(0, 86400000) or getDependencies(-1, ...) directly, or from code that defaulted endTs to 0 because no explicit end time was provided.","commonSituations":"Passing seconds instead of milliseconds (looks positive but tiny, or 0 for 'now' in seconds at epoch), unit confusion between microseconds and millis, or copying the Zipkin query API's optional endTs parameter into storage without defaulting it to System.currentTimeMillis().","solutions":["Pass endTs as epoch milliseconds greater than zero, e.g. System.currentTimeMillis()","Default omitted endTs to now at the caller: endTs != 0 ? endTs : System.currentTimeMillis()","Verify lookback is also positive (it is checked separately) and in millis"],"exampleFix":"// before\nlong endTs = 0; // 'unset'\nCall<List<DependencyLink>> links = spanStore.getDependencies(endTs, 86400000L);\n\n// after\nlong endTs = System.currentTimeMillis();\nCall<List<DependencyLink>> links = spanStore.getDependencies(endTs, 86400000L);","handlingStrategy":"validation","validationCode":"long endTs = (endTsParam > 0) ? endTsParam : System.currentTimeMillis();\nlong lookback = (lookbackParam > 0) ? lookbackParam : 86400000L;\nif (endTs <= 0 || lookback <= 0) throw new IllegalArgumentException(\"endTs and lookback must be positive epoch millis\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Default optional endTs to System.currentTimeMillis() before calling storage","Standardize on epoch millis across your tracing tooling to avoid unit confusion"],"tags":["zipkin","cassandra","dependencies","timestamp","validation"],"backgroundTag":null,"analyzedSha":"878ce2a1fad54ca941d17fdcf2e1d924b148eb1f","analyzedAt":"2026-08-14T15:17:09.895Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}