Skip to content

User logs and opentelemetry#562

Draft
t-persson wants to merge 47 commits intoeiffel-community:mainfrom
t-persson:user-logs-and-opentelemetry
Draft

User logs and opentelemetry#562
t-persson wants to merge 47 commits intoeiffel-community:mainfrom
t-persson:user-logs-and-opentelemetry

Conversation

@t-persson
Copy link
Copy Markdown
Collaborator

Applicable Issues

#443

Description of the Change

Enable opentelemetry traces, opentelemetry logs and ETOS user logs when running with the provider pipeline.
At the moment only the last two commits need to be reviewed, the rest are merge commits from dependencies:
#541
#469
#539
#537

Alternate Designs

Possible Drawbacks

Sign-off

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or

(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or

(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.

(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.

Signed-off-by: Tobias Persson tobias.persson@axis.com

Fixes so that when using a golang kubernetes client to deploy the
cluster custom resource it actually works.
We've been thinking a bit wrongly about the required and optional tags
when we've created our CRDs.
The required tag should be used when the controller requires that value
to be set in order to work.
The optional tag should be used when the controller does not require
that value to be set in order to work.

If we use a required tag and want to use defaults, then we must set the
defaults all the way up the 'struct-stack'. If we use optional instead
then we can get away with using the default value {} at the top.

Omitempty is a different beast entirely. When not using omitempty the
golang clients will automatically populate the fields with empty values,
this will cause the validations to incorrectly pass unless a more robust
validation strategy is set.
It would also cause the kubebuilder defaults not to be set, because
Kubernetes thinks that the fields are set when they are set to their
empty values.

Another note on omitempty is that it is only used when marshalling json,
not when unmarshalling. This means that clients that create resources
don't set the value (because of omitempty) but when the controller loads
in the resource the values are set to their empty values.

We now use omitempty on all fields that we don't require the clients to
set.
All values that are required (even if they have defaults already) now
have the required tag. This means that the value is required to be set,
either by a client or by the kubebuilder default tag.
For complex structs with defaults we use the optional tag so that we can
get away with using the default value {}.
Testrunner image is not in use until we start using the pipelines
and they are not being used yet.
Since the ETOS API URL defaults to an empty string, we should catch
it in the testrun_controller so that it is properly passed all the
way to the ETR
Add a new flag to specify pack names to deploy. May be useful
if one wants to deploy the required services and manually deploy
ETOS.
The pack name is the class name in lowercase.
t-persson added 16 commits March 4, 2026 14:05
All loggers that are used for providers shall publish userlogs
automatically and publish logs via opentelemetry if the environment
variable for opentelemetry is set.
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.

1 participant