Skip to content

Replace profiling data stream type with profiles#1189

Merged
teresaromero merged 6 commits into
elastic:mainfrom
teresaromero:align-profiles-terminology
Jun 18, 2026
Merged

Replace profiling data stream type with profiles#1189
teresaromero merged 6 commits into
elastic:mainfrom
teresaromero:align-profiles-terminology

Conversation

@teresaromero

@teresaromero teresaromero commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Replaces the profiling data stream type with profiles in the integration spec:

  • spec/integration/data_stream/manifest.spec.yml: renames the enum value profilingprofiles
  • validate_profiling_nonga.govalidate_profiles_nonga.go: renames the validator and its exported/unexported functions accordingly
  • Introduces tracesDataStreamType and profilesDataStreamType constants in types.go (shared across the semantic package) to replace inline string literals
  • Updates test fixtures and the error message assertion in validator_test.go

Why is it important?

Mixed usage of profiling (integration data streams) and profiles (input packages, Fleet data stream type) was causing inconsistency across the Package Spec and Fleet. profiles is the correct term, aligning with the OTel Profiles signal name.

The change is breaking but safe: the only published package in the integrations repository using this type is profiling_otel, which already uses profiles — no packages use the deprecated profiling string.

Checklist

Note on version patches: No backward-compatibility patch has been added for before: 3.7.0. This is intentional — the rename is a hard break:
profiling is invalid in all spec versions going forward, regardless of format_version. This is safe because no packages in the integrations repository currently use type: profiling.

Related issues

Summary by CodeRabbit

  • Documentation

    • Updated best practices guidance to use package-level constants for data stream type definitions instead of inline literals.
  • Bug Fixes

    • Renamed data stream type from "profiling" to "profiles" across schema, validation rules, and test packages.
  • Chores

    • Added internal constants for data stream types to maintain consistency across validators.

teresaromero and others added 3 commits June 4, 2026 15:02
Aligns the integration data stream type enum with the OTel Profiles
signal name and with the term already used in input package manifests.
Drops profiling as a valid data stream type (breaking change, technical
preview only).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Move tracesDataStreamType from its file-local const block into the
shared types.go, add profilesDataStreamType alongside it, and update
validate_profiles_nonga.go to use the constant instead of a magic
string. Document the convention in AGENTS.md so future validators
follow the same pattern.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@teresaromero teresaromero requested a review from a team as a code owner June 18, 2026 08:15
@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 3e7c4a3f-b138-4237-b2aa-4070dd5a8674

📥 Commits

Reviewing files that changed from the base of the PR and between c694243 and c9d5984.

📒 Files selected for processing (10)
  • AGENTS.md
  • code/go/internal/validator/semantic/types.go
  • code/go/internal/validator/semantic/validate_fleet_reserved_vars.go
  • code/go/internal/validator/semantic/validate_profiles_nonga.go
  • code/go/internal/validator/spec.go
  • code/go/pkg/validator/validator_test.go
  • spec/changelog.yml
  • spec/integration/data_stream/manifest.spec.yml
  • test/packages/bad_profiling_symbolizer/data_stream/example/manifest.yml
  • test/packages/profiling_symbolizer/data_stream/example/manifest.yml

📝 Walkthrough

Walkthrough

Renames the data stream type value profiling to profiles in the JSON schema enum, adds tracesDataStreamType and profilesDataStreamType Go constants, relocates tracesDataStreamType out of validate_fleet_reserved_vars.go, renames ValidateProfilingNonGA to ValidateProfilesNonGA, updates its wiring in spec.go, and propagates the rename to test fixtures, test assertions, changelog, and contributor docs.

Changes

profiling → profiles rename

Layer / File(s) Summary
Schema enum and Go constants
spec/integration/data_stream/manifest.spec.yml, code/go/internal/validator/semantic/types.go, code/go/internal/validator/semantic/validate_fleet_reserved_vars.go
The spec schema enum value for data stream type is changed from profiling to profiles. tracesDataStreamType and profilesDataStreamType are added to types.go; tracesDataStreamType is removed from the const block in validate_fleet_reserved_vars.go.
Validator rename and rule wiring
code/go/internal/validator/semantic/validate_profiles_nonga.go, code/go/internal/validator/spec.go
ValidateProfilingNonGA is renamed to ValidateProfilesNonGA, the internal helper is renamed to validateProfilesTypeNotUsed, the manifest type check uses profilesDataStreamType, and spec.go registers the renamed function.
Test fixtures, assertions, changelog, and docs
test/packages/.../manifest.yml (×2), code/go/pkg/validator/validator_test.go, spec/changelog.yml, AGENTS.md
Test manifests updated from type: profiling to type: profiles, expected error message updated, changelog entry added, and AGENTS.md gains a best-practice rule requiring constants for data stream type strings.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • mrodm

Poem

🐰 Hop hop, a rename so neat,
profilingprofiles, can't be beat!
Constants defined, no strings in sight,
The schema enum now set just right.
With tests all green and docs in place,
This little bunny picks up the pace! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title directly and concisely summarizes the main change: replacing the 'profiling' data stream type with 'profiles' across the codebase.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@teresaromero

Copy link
Copy Markdown
Contributor Author

test integrations

@elastic-vault-github-plugin-prod

Copy link
Copy Markdown

Created or updated PR in integrations repository to test this version. Check elastic/integrations#19627

@jsoriano jsoriano left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, only a couple of things on the changelogs and the docs for agents.

Comment thread spec/changelog.yml Outdated
type: enhancement
link: https://github.com/elastic/package-spec/pull/1177
- description: Replace `profiling` data stream type with `profiles` to align with the OTel Profiles signal name.
type: breaking-change

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can release it in 3.6 as bugfix, as this was not implementing what was expected.

Comment thread AGENTS.md
6. **Use descriptive variable names**: Avoid abbreviations in validators. Use full names like `packageName` (not `pkgName`), `dataStreamManifests` (not `dsManifests`), `templateIndex` (not `ptIdx`) for better readability.
7. **Use fsys.Path() for error messages**: When creating error messages, use `fsys.Path("relative/path")` to get the full package path, not just the relative path from a file object. This ensures error messages match the test framework's expectations.
8. **Data stream type constants**: Never use data stream type strings (e.g. `"traces"`, `"profiles"`) as inline literals. Declare them as package-level constants in `code/go/internal/validator/semantic/types.go` alongside the existing `tracesDataStreamType` and `profilesDataStreamType`. The canonical set mirrors the `type` enum in `spec/integration/data_stream/manifest.spec.yml`.
```go

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code snippet is related to the point 7 above, right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup! updated

Reclassify the change from `profiling` to `profiles` data stream type as a bugfix in the changelog to better reflect its nature. This aligns with the OTel Profiles signal name and updates the relevant PR link.
@teresaromero teresaromero requested a review from jsoriano June 18, 2026 09:17
@elasticmachine

Copy link
Copy Markdown

💚 Build Succeeded

History

@teresaromero teresaromero merged commit bdd2ec2 into elastic:main Jun 18, 2026
5 checks passed
@jsoriano jsoriano mentioned this pull request Jun 18, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants