Insights from LFX Mentorship with OpenTelemetry

Khushi JainKhushi Jain
3 min read

Linux Foundation Mentorship is a 3-month - tri-yearly program where you contribute code to CNCF projects. The highlight is that you get to work closely with the project maintainers and are compensated for it. It can be a great head-start to your engineering journey.

I applied to the OpenTelemetry project.

Contributing to open-source projects can be daunting, especially when starting out. However, the learning curve becomes significantly less steep with the right mentorship and guidance.

This is why I think a program like LFX can help you bring impactful features to the table. OpenTelemetry is one of the most active repositories under CNCF aiming to standardize observability across diverse systems. As a relatively new incubated project, it is particularly exciting for contributors to work on.

Initial Challenges

I was joyous and overwhelmed to know I would be the mentee for the term. The primary aim of my mentorship was to provide one logging bridge per language which would help end-users start using OTLP logging natively. It was initially challenging to understand the project's architecture and design patterns and read a lot of code to grasp it all. Each language's logging bridge needed to be integrated seamlessly.

Technical Contributions and Highlights

  1. Zap Logger Integration: One of the significant contributions I got to make was integrating the zap logger with otel. zap is a widely used high-performance logging library for Go, known for its efficiency and speed.

    Quick shoutout to AmirBlum, RobertPajak and TylerYahn for providing continuous feedback.

  2. Ruby's Default Logger: I also worked on integrating OpenTelemetry with Ruby's default logger. This involved creating middleware that automatically injects trace context into log entries, making it easier for developers to correlate logs with traces.

    I am thankful to KaylaReopella for helping me ramp up to Ruby. Similar to the zap, the Ruby bridge is ongoing, with several contributions currently under review.

  3. SwiftLog Integration: For the Swift programming language, I contributed a bridge for SwiftLog. This integration ensures that log messages can be correlated with trace data, enhancing observability in iOS and macOS applications. The SwiftLog integration is also a work in progress, with ongoing reviews and refinements. I am thankful to NachoBonafonte for providing constructive feedback.

My journey with OpenTelemetry has been transformative. I have enjoyed every aspect, from engaging with Special Interest Groups (SIGs) to spending quiet moments brainstorming solutions. This experience embodies the kind of engineering I have always aspired to do. Aside from that, the review process can sometimes be slow to ensure good coding practices and code quality but it's not something to be deterred by.

I am also sincerely grateful to my mentors Juraci Paixão Kröhling and AndrzejStencel for their guidance and support.

For those looking to contribute to open-source projects, I highly recommend seeking out mentorship programs like LFX.

I also hope the community will find the log bridges helpful :))

0
Subscribe to my newsletter

Read articles from Khushi Jain directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Khushi Jain
Khushi Jain